/* ===========================
   她阅 (TY) Reader - reader.css
   Chapter reading page styles - Lotus Whisper
   =========================== */

/* === Reader Body === */
.sn-reader-body {
    font-family: "Microsoft YaHei", "\5fae\8f6f\96c5\9ed1", sans-serif;
    background: #F5F0E8;
    color: #1a1a1a;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}

/* === Top Bar === */
.sn-reader-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    height: 48px;
    padding: 0 12px;
    background: #fff;
    color: #333;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.sn-reader-topbar.hidden {
    transform: translateY(-100%);
}

.sn-reader-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: #333;
    flex-shrink: 0;
}

.sn-reader-title {
    flex: 1;
    text-align: center;
    font-size: 15px;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 8px;
}

.sn-reader-topbar-right {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.sn-reader-follow-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    color: rgba(0, 0, 0, 0.4);
    cursor: pointer;
    flex-shrink: 0;
    transition: color 0.2s;
}

.sn-reader-follow-btn.active {
    color: #ef4444;
}

/* 心形：未收藏=空心描边，已收藏=实心填充 */
.sn-reader-follow-btn svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.sn-reader-follow-btn.active svg {
    fill: currentColor;
    stroke: currentColor;
}

.sn-reader-follow-btn:active {
    transform: scale(0.9);
}

.sn-reader-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
}

/* 移动端隐藏顶栏按钮的文字标签（仅 PC 可见） */
.sn-reader-btn-label {
    display: none;
}

/* PC 专用导航项：移动端默认隐藏 */
.sn-reader-pc-nav {
    display: none;
}

/* === Reading Content === */
.sn-reader-content {
    padding: 60px 20px 80px;
    max-width: 720px;
    margin: 0 auto;
    min-height: 100vh;
}

.sn-reader-chapter-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.4;
    color: inherit;
}

.sn-reader-text {
    font-size: 18px;
    line-height: 2;
    letter-spacing: 0.3px;
    word-break: break-all;
    color: inherit;
}

.sn-reader-text p {
    margin-bottom: 1em;
    text-indent: 2em;
}

.sn-reader-text h2 {
    font-size: 1em;
    font-weight: normal;
    text-indent: 2em;
}

.sn-reader-text img {
    max-width: 100%;
    height: auto;
    margin: 12px auto;
    display: block;
}

.sn-reader-text .no-content {
    text-align: center;
    color: #999;
    padding: 60px 0;
}

/* === End Section === */
.sn-reader-end {
    text-align: center;
    padding: 32px 0 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    margin-top: 32px;
}

.sn-reader-next-btn {
    display: inline-block;
    padding: 12px 48px;
    background: #E88CA5;
    color: #fff;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 400;
    text-decoration: none;
    transition: background 0.2s;
}

.sn-reader-next-btn:active {
    background: #D4738E;
}

.sn-reader-end-text {
    display: inline-block;
    padding: 12px 0;
    color: #999;
    font-size: 14px;
}

/* === Paywall === */
.sn-reader-paywall {
    text-align: center;
    padding: 32px 20px;
    margin-top: 24px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 12px;
}

.sn-reader-paywall p {
    margin-bottom: 8px;
    font-size: 14px;
    color: #666;
    text-indent: 0;
}

.sn-reader-balance {
    font-size: 13px !important;
    color: #999 !important;
}

.sn-reader-paywall-actions {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.sn-auto-pay {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
}

.sn-auto-pay input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #E88CA5;
}

.sn-btn-pay {
    display: inline-block;
    padding: 12px 48px;
    background: #E88CA5;
    color: #fff;
    border: none;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 400;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
}

.sn-btn-pay:active {
    background: #D4738E;
}

.sn-btn-pay.recharge {
    background: #f59e0b;
}

.sn-btn-pay.recharge:active {
    background: #d97706;
}

.sn-reader-body.has-floating-pay .sn-reader-paywall {
    display: none;
}

.sn-reader-body.has-floating-pay .sn-reader-content {
    padding-bottom: 180px;
}

.sn-floating-paybar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(68px + env(safe-area-inset-bottom));
    z-index: 140;
    pointer-events: none;
}

.sn-floating-paybar-main {
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(232, 140, 165, 0.18);
    border-radius: 18px;
    box-shadow: 0 14px 40px rgba(34, 24, 36, 0.16);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.sn-floating-paybar-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.sn-floating-paybar-title,
.sn-floating-paybar-price {
    font-size: 15px;
    font-weight: 600;
    color: #2f2430;
    line-height: 1.3;
}

.sn-floating-paybar-subtitle,
.sn-floating-paybar-balance {
    font-size: 12px;
    color: #8b7280;
    line-height: 1.3;
}

.sn-floating-paybar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.sn-floating-autopay {
    white-space: nowrap;
    padding: 0 2px;
}

.sn-floating-pay-btn {
    min-width: 128px;
    padding: 12px 20px;
    text-align: center;
    box-shadow: 0 10px 20px rgba(232, 140, 165, 0.22);
}

/* === Bottom Bar === */
.sn-reader-bottombar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 56px;
    padding: 0 8px;
    padding-bottom: env(safe-area-inset-bottom);
    background: #fff;
    box-shadow: 0 -1px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.sn-reader-bottombar.hidden {
    transform: translateY(100%);
}

.sn-reader-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 4px 12px;
    color: #333;
    font-size: 11px;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s;
}

.sn-reader-nav-btn:active {
    opacity: 0.7;
}

.sn-reader-nav-btn.disabled {
    color: #666;
    cursor: default;
    pointer-events: none;
}

.sn-reader-nav-btn svg {
    flex-shrink: 0;
}

/* === TOC Modal === */
.sn-reader-toc-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
}

.sn-reader-toc-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    touch-action: none;
}

.sn-reader-toc-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 80%;
    max-width: 320px;
    height: 100%;
    background: #fff;
    border-radius: 0 16px 16px 0;
    display: flex;
    flex-direction: column;
    animation: slideInLeft 0.3s ease;
}

@keyframes slideInLeft {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.sn-reader-toc-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.sn-reader-toc-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.sn-reader-toc-header span {
    flex: 1;
    font-size: 13px;
    color: #999;
}

.sn-reader-toc-header button {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
}

/* TOC pagination tabs */
.sn-reader-toc-tabs {
    flex-shrink: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 10px 16px;
    border-bottom: 1px solid #eee;
    display: none;
}

.sn-reader-toc-tabs::-webkit-scrollbar { display: none; }

.sn-reader-toc-tabs.has-tabs {
    display: flex;
    gap: 8px;
}

.sn-reader-toc-tabs .sn-toc-tab-btn {
    flex-shrink: 0;
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 12px;
    background: #f3f4f6;
    color: #666;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.sn-reader-toc-tabs .sn-toc-tab-btn.active {
    background: #E88CA5;
    color: #fff;
}

.sn-reader-toc-list {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 8px 0;
}

.sn-reader-toc-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #f5f5f5;
    text-decoration: none;
    white-space: nowrap;
}

.sn-reader-toc-list a:active {
    background: #f5f5f5;
}

.sn-reader-toc-list a .sn-chapter-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sn-reader-toc-list a .sn-chapter-status {
    font-size: 11px;
    color: #999;
    flex-shrink: 0;
    margin-left: 12px;
    padding: 2px 8px;
    border-radius: 10px;
}
.sn-chapter-status.state-free { background: #e8f8f0; color: #27ae60; }
.sn-chapter-status.state-free-time { background: #fef5e7; color: #e67e22; }
.sn-chapter-status.state-login { background: #ebf5fb; color: #2980b9; }
.sn-chapter-status.state-vip { background: #f4ecf7; color: #8e44ad; }
.sn-chapter-status.state-lock { background: #fdedec; color: #c0392b; }
.sn-chapter-status.state-purchased { background: #e8f6f3; color: #16a085; }

.sn-reader-toc-list a.current {
    font-weight: 600;
    background: #fff5f5;
}
.sn-reader-toc-list a.current .sn-chapter-name {
    color: #E88CA5;
}

/* === Settings Modal === */
.sn-reader-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
}

.sn-reader-settings-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    touch-action: none;
}

.sn-reader-settings-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 20px 20px 0 0;
    padding: 24px 20px;
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
    animation: slideUpSettings 0.3s ease;
}

@keyframes slideUpSettings {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.sn-setting-group {
    margin-bottom: 20px;
}

.sn-setting-group:last-child {
    margin-bottom: 0;
}

.sn-setting-group label {
    display: block;
    font-size: 13px;
    color: #999;
    margin-bottom: 10px;
}

.sn-setting-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sn-setting-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #f3f4f6;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    user-select: none;
    flex-shrink: 0;
    transition: background 0.15s;
}

.sn-setting-btn:active {
    background: #e5e7eb;
}

.sn-setting-control input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    outline: none;
}

.sn-setting-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #E88CA5;
    cursor: pointer;
}

/* === Theme Dots === */
.sn-setting-themes {
    display: flex;
    gap: 16px;
}

.sn-theme-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #ddd;
    cursor: pointer;
    transition: border-color 0.2s;
}

.sn-theme-dot.active {
    border-color: #E88CA5 !important;
}

/* === Page Mode Buttons === */
.sn-setting-modes {
    display: flex;
    gap: 8px;
}

.sn-mode-btn {
    flex: 1;
    padding: 8px 0;
    text-align: center;
    font-size: 13px;
    color: #666;
    background: #f3f4f6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.sn-mode-btn.active {
    background: #E88CA5;
    color: #fff;
}

/* === iOS-style Switch === */
.sn-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.sn-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.sn-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ccc;
    border-radius: 24px;
    transition: background 0.2s;
}

.sn-switch-slider::before {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    left: 2px;
    top: 2px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s;
}

.sn-switch input:checked + .sn-switch-slider {
    background: #E88CA5;
}

.sn-switch input:checked + .sn-switch-slider::before {
    transform: translateX(20px);
}

.sn-switch-hint {
    color: #999;
    font-size: 13px;
}

/* 关闭段落评论时隐藏所有气泡按钮 */
.sn-reader-body.hide-para-bubbles .sn-para-bubble {
    display: none !important;
}

/* === Theme Overrides (applied to body) === */
.sn-reader-body[data-theme="dark"] {
    background: #1A1A2E;
    color: #ccc;
}

.sn-reader-body[data-theme="dark"] .sn-reader-paywall {
    background: rgba(255, 255, 255, 0.05);
}

.sn-reader-body[data-theme="dark"] .sn-reader-end {
    border-top-color: rgba(255, 255, 255, 0.1);
}

/* === Ad Styles === */
.sn-reader-content ins,
.sn-reader-content iframe {
    max-width: 100%;
}

/* ============================================================ */
/* 段落评论:段尾 SVG 对话气泡                                       */
/* ============================================================ */
.sn-reader-text p .sn-para-bubble {
    position: relative;
    display: inline-block;
    width: 28px;
    height: 28px;
    margin: 0 0 0 4px;
    padding: 0;
    border: none;
    outline: none;
    background: none;
    -webkit-appearance: none;
    appearance: none;
    vertical-align: -6px;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    color: #999;
    transition: color 0.15s;
    font-family: inherit;
    line-height: 1;
    box-sizing: border-box;
}

.sn-reader-text p .sn-para-bubble:active {
    color: #666;
}

/* SVG 画布 */
.sn-para-bubble .sn-pb-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* 外框:path 双子路径自带空心描边效果,用 fill 渲染 */
.sn-para-bubble .sn-pb-frame {
    fill: currentColor;
    stroke: none;
}

/* 空态的 "+" 十字线 (1024 viewBox,stroke-width 需相应放大) */
.sn-para-bubble .sn-pb-plus {
    stroke: currentColor;
    stroke-width: 64;
    stroke-linecap: round;
}

/* 数字居中叠在 SVG 上(偏上,避开底部小尖角) */
.sn-para-bubble .sn-pb-num {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 78%;
    padding-top: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    pointer-events: none;
    color: #888;
}

/* 有评论 */
.sn-reader-text p .sn-para-bubble.has {
    color: #999;
}

/* 无评论:很浅,hover 才显现 */
.sn-reader-text p .sn-para-bubble.empty {
    color: #ccc;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, color 0.15s;
}

/* PC:hover 显示 */
@media (hover: hover) {
    .sn-reader-text p:hover .sn-para-bubble.empty {
        opacity: 1;
        pointer-events: auto;
    }
}

/* 移动端:只有 JS 加 .p-active 才显示 */
@media (hover: none) {
    .sn-reader-text p .sn-para-bubble.empty {
        opacity: 0 !important;
        pointer-events: none !important;
    }

    .sn-reader-text p.p-active .sn-para-bubble.empty {
        opacity: 1 !important;
        pointer-events: auto !important;
    }
}

/* dark */
.sn-reader-body[data-theme="dark"] .sn-reader-text p .sn-para-bubble.has {
    color: rgba(255, 255, 255, 0.45);
}

.sn-reader-body[data-theme="dark"] .sn-para-bubble .sn-pb-num {
    color: rgba(255, 255, 255, 0.5);
}

.sn-reader-body[data-theme="dark"] .sn-reader-text p .sn-para-bubble.empty {
    color: rgba(255, 255, 255, 0.2);
}

/* ============================================================ */
/* 段落评论:底部 Sheet                                              */
/* ============================================================ */
.sn-para-sheet {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 300;
}

.sn-para-sheet-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.28s ease;
    touch-action: none;
}

.sn-para-sheet.open .sn-para-sheet-bg {
    opacity: 1;
}

.sn-para-sheet-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 18px 18px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
    transform: translateY(100%);
    transition: transform 0.28s ease;
    overflow: hidden;
}

.sn-para-sheet.open .sn-para-sheet-panel {
    transform: translateY(0);
}

.sn-para-sheet-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
}

.sn-para-sheet-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #222;
}

.sn-para-sheet-header button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.sn-para-sheet-quote-wrap {
    padding: 12px 16px 0;
    flex-shrink: 0;
}

.sn-para-sheet-quote {
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.55;
    color: #666;
    background: rgba(0, 0, 0, 0.035);
    border-left: 3px solid #E88CA5;
    border-radius: 4px;
    word-break: break-word;
}

.sn-para-sheet-list {
    flex: 1;
    min-height: 100px;
    padding: 8px 16px 12px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.sn-para-sheet-list .sn-comment-loading {
    padding: 24px 0;
    text-align: center;
    color: #999;
    font-size: 13px;
}

.sn-para-sheet-input {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 10px 16px 14px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: #fff;
    flex-shrink: 0;
}

.sn-para-sheet-textarea {
    flex: 1;
    min-height: 38px;
    max-height: 120px;
    padding: 9px 12px;
    font-size: 14px;
    line-height: 1.4;
    color: #222;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid transparent;
    border-radius: 19px;
    resize: none;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
}

.sn-para-sheet-textarea:focus {
    background: #fff;
    border-color: #E88CA5;
}

.sn-para-sheet-send {
    flex-shrink: 0;
    padding: 0 18px;
    height: 38px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: #E88CA5;
    border: none;
    border-radius: 19px;
    cursor: pointer;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.sn-para-sheet-send:active {
    background: #d16f8a;
}

.sn-para-sheet-send:disabled {
    background: #d4d4d4;
    cursor: not-allowed;
}

/* ============================================================ */
/* PC 端样式 (min-width: 1080px)                                 */
/* 参考 hx/read.css 的两侧悬浮工具栏布局，融合 TY 粉色主题          */
/* DOM 结构与移动端共用，仅通过 CSS 重定位                          */
/* ============================================================ */
@media (min-width: 1080px) {

    /* === 页面：PC 上不需要为顶栏让出 60px === */
    .sn-reader-body {
        padding-top: 0;
    }

    /* === 阅读卡片：白底+轻阴影，1080 居中 === */
    .sn-reader-content {
        max-width: 1080px;
        margin: 32px auto 60px;
        padding: 48px 64px 56px;
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
        min-height: calc(100vh - 92px);
    }

    /* === 章节标题强化分隔 === */
    .sn-reader-chapter-title {
        font-size: 26px;
        padding-bottom: 20px;
        border-bottom: 1px solid #f0f0f0;
        margin-bottom: 32px;
        text-align: center;
    }

    /* === 正文字号微增、行距更舒服 === */
    .sn-reader-text {
        font-size: 19px;
        line-height: 2.1;
        letter-spacing: 0.4px;
        word-break: normal;
        overflow-wrap: break-word;
    }

    /* === 顶栏放屏幕左侧：4 项竖排 (首頁/書籍/分享/收藏) === */
    /* === 底栏仍在右侧：5 项章节导航 === */
    /* 两个面板分别在左右两侧，各自独立垂直居中                          */
    .sn-reader-topbar {
        top: 50%;
        left: 24px;
        right: auto;
        bottom: auto;
        transform: translateY(-50%);
        flex-direction: column;
        height: auto;
        width: auto;
        padding: 14px 8px;
        gap: 4px;
        border-radius: 12px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
        background: #fff;
        transition: opacity 0.3s ease;
    }

    /* 防止移动端的滚动隐藏类在 PC 上把面板推走 */
    .sn-reader-topbar.hidden {
        transform: translateY(-50%);
        opacity: 1;
    }

    /* PC：隐藏移动端的返回书页按钮和章节标题 */
    .sn-reader-mob-back,
    .sn-reader-title {
        display: none;
    }

    /* PC：显示 PC 专用导航项 */
    .sn-reader-pc-nav {
        display: flex;
    }

    /* 顶栏内的按钮文字标签：PC 可见 */
    .sn-reader-btn-label {
        display: block;
        font-size: 11px;
        line-height: 1;
        margin-top: 2px;
    }

    /* topbar-right 容器竖向排列，使收藏按钮作为第 4 项 */
    .sn-reader-topbar-right {
        flex-direction: column;
        gap: 4px;
        width: 100%;
    }

    /* 顶栏所有按钮统一风格：column + icon + label */
    .sn-reader-nav-item,
    .sn-reader-follow-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: auto;
        height: auto;
        min-width: 64px;
        padding: 10px 12px;
        gap: 4px;
        border-radius: 8px;
        text-decoration: none;
        color: #333;
        background: none;
        border: none;
        cursor: pointer;
        transition: background 0.2s, color 0.2s, transform 0.15s;
    }

    .sn-reader-nav-item:hover,
    .sn-reader-follow-btn:hover {
        background: #FFF0F3;
        color: #E88CA5;
    }

    /* 心形激活后 hover 保持红色 */
    .sn-reader-follow-btn.active {
        color: #ef4444;
    }

    .sn-reader-follow-btn.active:hover {
        background: #FFF0F3;
        color: #ef4444;
    }

    .sn-reader-nav-item:active,
    .sn-reader-follow-btn:active {
        transform: scale(0.96);
    }

    /* 底部面板 (5 项章节导航) 在右侧，独立垂直居中 */
    .sn-reader-bottombar {
        top: 50%;
        right: 24px;
        bottom: auto;
        left: auto;
        transform: translateY(-50%);
        flex-direction: column;
        height: auto;
        width: auto;
        padding: 14px 8px;
        padding-bottom: 14px;
        gap: 4px;
        justify-content: flex-start;
        border-radius: 12px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
        background: #fff;
        transition: opacity 0.3s ease;
    }

    .sn-reader-bottombar.hidden {
        transform: translateY(-50%);
        opacity: 1;
    }

    .sn-reader-nav-btn {
        flex-direction: column;
        min-width: 64px;
        padding: 10px 12px;
        gap: 4px;
        font-size: 12px;
        border-radius: 8px;
        transition: background 0.2s, color 0.2s;
    }

    .sn-reader-nav-btn:hover {
        background: #FFF0F3;
        color: #E88CA5;
        opacity: 1;
    }

    .sn-reader-nav-btn.disabled {
        opacity: 0.5;
    }

    .sn-reader-nav-btn.disabled:hover {
        background: transparent;
        color: #666;
    }

    /* === 章末"下一章" === */
    .sn-reader-end {
        padding: 40px 0 24px;
        margin-top: 40px;
    }

    .sn-reader-next-btn {
        font-size: 16px;
        padding: 14px 64px;
        cursor: pointer;
    }

    .sn-reader-next-btn:hover {
        background: #D4738E;
    }

    /* === 付费墙居中收窄 === */
    .sn-reader-paywall {
        max-width: 540px;
        margin: 40px auto 0;
        padding: 40px 32px;
    }

    .sn-btn-pay {
        cursor: pointer;
    }

    .sn-btn-pay:hover {
        background: #D4738E;
    }

    .sn-btn-pay.recharge:hover {
        background: #d97706;
    }

    /* === TOC 抽屉 PC 加宽 === */
    .sn-reader-toc-panel {
        max-width: 380px;
    }

    .sn-reader-toc-list a {
        cursor: pointer;
        transition: background 0.15s;
    }

    .sn-reader-toc-list a:hover {
        background: #FFF0F3;
    }

    .sn-reader-toc-list a:hover .sn-chapter-name {
        color: #E88CA5;
    }

    .sn-reader-toc-tabs .sn-toc-tab-btn {
        cursor: pointer;
        transition: background 0.15s, color 0.15s;
    }

    .sn-reader-toc-tabs .sn-toc-tab-btn:not(.active):hover {
        background: #FFF0F3;
        color: #E88CA5;
    }

    .sn-reader-toc-header button:hover {
        color: #E88CA5;
    }

    /* === 设置面板：底部上滑改为中心弹窗 === */
    .sn-reader-settings-panel {
        top: 50%;
        left: 50%;
        right: auto;
        bottom: auto;
        transform: translate(-50%, -50%);
        width: 90%;
        max-width: 480px;
        border-radius: 16px;
        padding: 32px;
        padding-bottom: 32px;
        animation: snFadeInScale 0.22s ease;
    }

    @keyframes snFadeInScale {
        from {
            opacity: 0;
            transform: translate(-50%, -50%) scale(0.96);
        }
        to {
            opacity: 1;
            transform: translate(-50%, -50%) scale(1);
        }
    }

    .sn-setting-group {
        margin-bottom: 28px;
    }

    .sn-setting-group label {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .sn-setting-btn {
        cursor: pointer;
    }

    .sn-setting-btn:hover {
        background: #FFF0F3;
        color: #E88CA5;
    }

    .sn-theme-dot {
        width: 40px;
        height: 40px;
        cursor: pointer;
        transition: transform 0.15s, border-color 0.2s;
    }

    .sn-theme-dot:hover {
        transform: scale(1.08);
    }

    /* === 段落评论 sheet：底部上滑改为右侧抽屉 === */
    .sn-para-sheet-panel {
        top: 0;
        bottom: 0;
        left: auto;
        right: 0;
        height: 100vh;
        max-height: none;
        width: 440px;
        border-radius: 18px 0 0 18px;
        transform: translateX(100%);
        padding-bottom: 0;
    }

    .sn-para-sheet.open .sn-para-sheet-panel {
        transform: translateX(0);
    }

    .sn-para-sheet-header button:hover {
        color: #E88CA5;
    }

    .sn-para-sheet-send {
        cursor: pointer;
    }

    .sn-para-sheet-send:hover:not(:disabled) {
        background: #d16f8a;
    }

    /* === 段落评论气泡 PC 微调 === */
    .sn-reader-text p .sn-para-bubble:hover {
        color: #E88CA5;
    }

    /* === 暂无内容提示 === */
    .sn-reader-text .no-content {
        padding: 100px 0;
        font-size: 15px;
    }
}

/* === 超大屏 (>= 1280px)：阅读区适度加宽留白 === */
@media (min-width: 1280px) {
    .sn-reader-content {
        padding: 56px 80px 64px;
    }
}

