/* ===========================
   她阅 (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;
    position: relative;
    isolation: isolate;
}

/* 与首页同款水彩花卉背景：阅读页正文区不展示，仅在两侧留白 / 顶底栏外可见 */
.sn-reader-body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url('/images/bg.webp');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    opacity: 0.08;
    z-index: -1;
    pointer-events: none;
}

/* === 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%);
}

/* === Top Bar 内嵌 App 下载提示 === */
/* 当 topbar 含 .has-apptip 时，改为列布局：apptip 一行 + 原 nav 一行 */
.sn-reader-topbar.has-apptip {
    flex-direction: column;
    height: auto;
    padding: 0;
    align-items: stretch;
}

.sn-reader-topbar-row {
    display: flex;
    align-items: center;
    height: 48px;
    padding: 0 12px;
    width: 100%;
}

/* apptip 内嵌后取消其自身的 fixed 定位/阴影/高 z-index，跟随 topbar 一起 transform */
.sn-reader-topbar #apptip {
    position: static !important;
    box-shadow: none !important;
    width: 100% !important;
    transform: none !important;
    z-index: auto !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
}

/* 内容区让出 has-apptip 顶栏占用的额外 30px */
.sn-reader-topbar.has-apptip ~ .sn-reader-content {
    padding-top: 90px;
}

/* 顶栏隐藏时同步收回内容区顶部留白,避免顶栏滑出后留下空白带 */
.sn-reader-content {
    transition: padding-top 0.3s ease;
}

.sn-reader-topbar.hidden ~ .sn-reader-content {
    padding-top: 20px;
}

.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: 768px;
    margin: 0 auto;
    min-height: 100vh;
    background: #F5F0E8;
    position: relative;
}

.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;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", "Hiragino Sans GB", "WenQuanYi Micro Hei", sans-serif;
}

.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;
    min-height: 0;
    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: 1.4em;
    height: 1.4em;
    margin: 0 0 0 4px;
    padding: 0;
    border: none;
    outline: none;
    background: none;
    -webkit-appearance: none;
    appearance: none;
    vertical-align: middle;
    transform: translateY(-0.1em);
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    color: #999;
    transition: color 0.15s;
    font-family: inherit;
    font-size: 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;
    }
}

/* 移动端:空气泡不显现,改为长按段落直接打开评论 Sheet。
   长按需禁用文本选择 / 系统选词菜单,否则与原生选词手势冲突。 */
@media (hover: none) {
    .sn-reader-text p {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }

    .sn-reader-text p .sn-para-bubble.empty {
        opacity: 0 !important;
        pointer-events: none !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: 768px)                                  */
/* 顶栏 / 底栏 / 内容区 与首页 .sn-main 一致，锁 768 居中            */
/* ============================================================ */
@media (min-width: 768px) {
    /* 顶部 / 底部 浮动工具栏：跟首页 .sn-header / .sn-tabbar 一样锁 768 居中 */
    .sn-reader-topbar,
    .sn-reader-bottombar {
        left: 50%;
        right: auto;
        width: 768px;
        max-width: 100vw;
        transform: translateX(-50%);
        box-sizing: border-box;
    }

    /* hidden 状态：保留水平居中变换的同时执行 Y 轴位移 */
    .sn-reader-topbar.hidden {
        transform: translateX(-50%) translateY(-100%);
    }

    .sn-reader-bottombar.hidden {
        transform: translateX(-50%) translateY(100%);
    }

    /* 浮动登录 / 购买条 (NoPay 章节)：与底栏对齐，锁 768 居中 */
    .sn-floating-paybar {
        left: 50%;
        right: auto;
        width: calc(768px - 24px);
        max-width: calc(100vw - 24px);
        transform: translateX(-50%);
    }
}
