/**
 * 微信读书插件 - 前端样式
 */

/* ===== 分页 ===== */
.weread-pagination {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 24px 0;
    padding: 16px 0;
    border-top: 1px solid #eee;
}

.weread-page-btn,
.weread-page-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 6px;
    font-size: 13px;
    color: #555;
    background: #f5f5f5;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.weread-page-btn:hover,
.weread-page-num:hover {
    background: #e8f5e9;
    color: #07c160;
    text-decoration: none;
}

.weread-page-current {
    background: #07c160;
    color: #fff;
    font-weight: 600;
    pointer-events: none;
}

.weread-page-current:hover {
    background: #07c160;
    color: #fff;
}

.weread-page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    color: #999;
    font-size: 13px;
}

.weread-page-info {
    margin-left: auto;
    font-size: 12px;
    color: #999;
}

/* ===== 笔记时间 ===== */
.weread-note-time {
    font-size: 12px;
    color: #bbb;
    margin-top: 8px;
}
/* 当 .weread-note-time 被嵌入到 .weread-note-book-meta 行内时，
   取消其块级 margin-top 行为（meta 行用 flex gap 控制间距） */
.weread-note-book-meta .weread-note-time {
    margin-top: 0;
}

/* ===== 笔记摘要 ===== */
.weread-note-abstract {
    font-size: 13px;
    color: #666;
    line-height: 1.7;
    padding: 8px 12px;
    background: #fffbf0;
    border-radius: 4px;
    margin-top: 8px;
    border-left: 3px solid #ffc107;
}

/* ===== 报告时段 ===== */
.weread-report-periods {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 600px) {
    .weread-report-periods {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== 历年柱状图 ===== */
.weread-yearly {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.weread-yearly h3 {
    margin: 0 0 20px;
    font-size: 16px;
    color: #333;
}

.weread-yearly-chart {
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 20px;
    min-height: 200px;
    min-width: max-content;
    padding: 20px 0 0;
    /* border-bottom: 2px solid #e0e0e0; */
}

.weread-yearly-bar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    max-width: 80px;
    justify-content: flex-end;
}

.weread-yearly-value {
    font-size: 12px;
    color: #07c160;
    font-weight: 700;
    margin-bottom: 4px;
    flex-shrink: 0;
}

.weread-yearly-bar {
    width: 100%;
    max-width: 60px;
    background: linear-gradient(180deg, #07c160, #06ad56);
    border-radius: 4px 4px 0 0;
    min-height: 4px;
    flex-shrink: 0;
    transition: height 0.6s ease;
}

.weread-yearly-label {
    margin-top: 8px;
    font-size: 13px;
    color: #333;
    font-weight: 600;
    flex-shrink: 0;
}

/* ===== 书评标签 ===== */
.weread-badge-review {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    line-height: 1.6;
    background: #fce4ec;
    color: #c62828;
    margin-left: 8px;
}

/* ===== Tab 样式 ===== */
.weread-all {
    margin: 20px 0;
}

.weread-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 24px;
}

.weread-tab {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    background: none;
    font-size: 15px;
    font-weight: 500;
    color: #888;
    cursor: pointer;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s ease, border-color 0.2s ease;
    outline: none;
}

.weread-tab:hover {
    color: #333;
}

.weread-tab.active {
    color: #07c160;
    border-bottom-color: #07c160;
}

/* ===== 书架 ===== */
.weread-shelf {
    display: grid;
    gap: 20px;
    margin: 20px 0;
}

.weread-shelf-cols-2 { grid-template-columns: repeat(2, 1fr); }
.weread-shelf-cols-3 { grid-template-columns: repeat(3, 1fr); }
.weread-shelf-cols-4 { grid-template-columns: repeat(4, 1fr); }
.weread-shelf-cols-5 { grid-template-columns: repeat(5, 1fr); }
.weread-shelf-cols-6 { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 768px) {
    .weread-shelf-cols-3,
    .weread-shelf-cols-4,
    .weread-shelf-cols-5,
    .weread-shelf-cols-6 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .weread-shelf {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

.weread-book-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.weread-book-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.weread-book-cover {
    position: relative;
    padding-top: 133%;
    background: #f5f5f5;
    overflow: hidden;
}

.weread-book-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.weread-book-cover-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
}

.weread-book-cover-placeholder span {
    font-size: 28px;
    font-weight: 700;
    color: #2e7d32;
    opacity: 0.6;
}

.weread-book-info {
    padding: 12px;
}

.weread-book-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px;
    line-height: 1.4;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #333;
}

.weread-book-author {
    font-size: 12px;
    color: #999;
    margin: 0 0 8px;
}

.weread-book-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.weread-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    line-height: 1.6;
}

.weread-badge-reading {
    background: #e8f5e9;
    color: #2e7d32;
}

.weread-badge-read {
    background: #e3f2fd;
    color: #1565c0;
}

.weread-badge-want_to_read {
    background: #fff3e0;
    color: #e65100;
}

.weread-progress {
    font-size: 12px;
    color: #666;
}

/* ===== 笔记 ===== */
.weread-notes {
    margin: 20px 0;
}

.weread-note-item {
    background: #fff;
    border-radius: 8px;
    /* box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); */
    padding: 20px;
    margin-bottom: 16px;
}

/* ===== 笔记项：左封面 + 右文字（文字内部两行） ===== */
.weread-note-book {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}
/* 仅当有 header（封面+书名）时启用水平 flex */
.weread-note-book:not(.weread-note-book-mini) {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.weread-note-book-cover {
    flex-shrink: 0;
}

.weread-note-book-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    justify-content: center;
}

.weread-note-book-title-row {
    line-height: 1.4;
}

/* 第二行：作者 + 书评徽章 + 入库时间 */
.weread-note-book-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: #999;
}

/* 列表页作者/时间：让图标与文字在视觉上贴近（用普通空格即可） */
.weread-note-book-author-wrap,
.weread-note-book-meta .weread-note-time {
    display: inline;
}

/* 书籍详情页（show_book_info=false）没有书名/作者行，
   只剩一行 meta：去掉多余的底部分隔线，但保留与下方原文内容的间距 */
.weread-note-book-mini {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 12px;
}

.weread-note-cover {
    width: 36px;
    height: 48px;
    object-fit: cover;
    border-radius: 3px;
}

.weread-note-book-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.weread-note-book-author {
    font-size: 12px;
    color: #999;
}

.weread-note-chapter {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}

.weread-note-mark {
    margin: 0 0 12px;
    padding: 10px 16px;
    /* border-left: 3px solid #07c160;
    background: #f9fdf9;
    color: #555; */
    font-size: 14px;
    line-height: 1.8;
    border-radius: 0 4px 4px 0;
}

.weread-note-thought {
    font-size: 13px;
    color: #666;
    line-height: 1.7;
    padding: 8px 12px;
    background: #fafafa;
    border-radius: 4px;
}

.weread-note-label {
    font-weight: 600;
    color: #07c160;
}

/* ===== 阅读报告 ===== */
.weread-report {
    margin: 20px 0;
}

.weread-report-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 600px) {
    .weread-report-summary {
        grid-template-columns: repeat(2, 1fr);
    }
}

.weread-report-stat {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 24px 16px;
    text-align: center;
    transition: transform 0.2s ease;
}

.weread-report-stat:hover {
    transform: translateY(-3px);
}

.weread-report-stat-value {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: #07c160;
    line-height: 1.2;
}

.weread-report-stat-label {
    display: block;
    font-size: 13px;
    color: #999;
    margin-top: 6px;
}

.weread-report-total {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 24px;
}

.weread-report-total h3 {
    margin: 0 0 10px;
    font-size: 16px;
    color: #333;
}

.weread-report-total p {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.8;
}

/* ===== 阅读时长排行 ===== */
.weread-report-top {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-top: 24px;
}

.weread-report-top h3 {
    margin: 0 0 16px;
    font-size: 16px;
    color: #333;
}

.weread-report-top-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.weread-report-top-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.weread-report-top-rank {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f0f0f0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.weread-report-top-item:first-child .weread-report-top-rank {
    background: #ff6b6b;
    color: #fff;
}

.weread-report-top-item:nth-child(2) .weread-report-top-rank {
    background: #ffa726;
    color: #fff;
}

.weread-report-top-item:nth-child(3) .weread-report-top-rank {
    background: #ffd54f;
    color: #fff;
}

.weread-report-top-cover {
    width: 32px;
    height: 43px;
    object-fit: cover;
    border-radius: 3px;
    flex-shrink: 0;
}

.weread-report-top-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.weread-report-top-title {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.weread-report-top-time {
    font-size: 12px;
    color: #07c160;
    font-weight: 600;
}

.weread-report-top-bar {
    width: 80px;
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
    flex-shrink: 0;
}

.weread-report-top-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #07c160, #06ad56);
    border-radius: 3px;
    transition: width 0.6s ease;
}

/* ===== 日历热力图 ===== */
.weread-heatmap {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* 桌面端隐藏横向滚动条（保留触摸板/鼠标滚轮横向滑动能力） */
@media (min-width: 769px) {
    .weread-heatmap {
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .weread-heatmap::-webkit-scrollbar {
        display: none;
        height: 0;
        width: 0;
    }
}

.weread-heatmap h3 {
    margin: 0 0 16px;
    font-size: 16px;
    color: #333;
}

.weread-heatmap-grid {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: max-content;
}

.weread-heatmap-months {
    display: flex;
    gap: 1px;
    margin-bottom: 1px;
    padding-left: 0;
}

.weread-heatmap-month {
    width: 10px;
    font-size: 9px;
    color: #999;
    text-align: center;
    flex-shrink: 0;
    line-height: 15px;
}

.weread-heatmap-month-empty {
    visibility: hidden;
}

.weread-heatmap-weeks {
    display: flex;
    gap: 1px;
}

.weread-heatmap-week {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.weread-heatmap-day {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.weread-heatmap-day:hover {
    transform: scale(1.4);
    outline: 2px solid #333;
    outline-offset: 0;
    z-index: 10;
    position: relative;
}

.weread-heatmap-day-empty {
    visibility: hidden;
}

.weread-heat-level-0 { background: #ebedf0; }
.weread-heat-level-1 { background: #c6e48b; }
.weread-heat-level-2 { background: #7bc96f; }
.weread-heat-level-3 { background: #239a3b; }
.weread-heat-level-4 { background: #196127; }

.weread-heatmap-day.is-today {
    outline: 2px solid #07c160;
    outline-offset: 1px;
}

.weread-heatmap-legend {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
    margin-top: 10px;
    font-size: 11px;
    color: #999;
}

.weread-heatmap-legend span {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    display: inline-block;
}

/* 热力图 tooltip */
.weread-heatmap-tooltip {
    display: none;
    position: absolute;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
    line-height: 1.5;
}

/* ===== 阅读时长统计 ===== */
.weread-reading-time {
    margin: 20px 0;
}

.weread-rt-periods {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 600px) {
    .weread-rt-periods {
        grid-template-columns: repeat(2, 1fr);
    }
}

.weread-rt-period {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 24px 16px;
    text-align: center;
    transition: transform 0.2s ease;
}

.weread-rt-period:hover {
    transform: translateY(-3px);
}

.weread-rt-period-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.weread-rt-period-label {
    font-size: 13px;
    color: #999;
    margin-bottom: 8px;
}

.weread-rt-period-value {
    font-size: 22px;
    font-weight: 700;
    color: #07c160;
}

/* ===== 阅读时长排行 ===== */
.weread-rt-ranking {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 24px;
}

.weread-rt-ranking h3 {
    margin: 0 0 20px;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.weread-rt-ranking-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.weread-rt-ranking-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.weread-rt-ranking-rank {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #f0f0f0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.weread-rt-ranking-top1 {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: #fff;
}

.weread-rt-ranking-top2 {
    background: linear-gradient(135deg, #ffa726, #fb8c00);
    color: #fff;
}

.weread-rt-ranking-top3 {
    background: linear-gradient(135deg, #ffd54f, #f9a825);
    color: #fff;
}

.weread-rt-ranking-cover {
    width: 36px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.weread-rt-ranking-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.weread-rt-ranking-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.weread-rt-ranking-author {
    font-size: 12px;
    color: #999;
}

.weread-rt-ranking-bar-wrap {
    width: 100px;
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
    flex-shrink: 0;
}

.weread-rt-ranking-bar {
    height: 100%;
    background: linear-gradient(90deg, #07c160, #06ad56);
    border-radius: 3px;
    transition: width 0.6s ease;
}

.weread-rt-ranking-time {
    font-size: 13px;
    font-weight: 600;
    color: #07c160;
    flex-shrink: 0;
    min-width: 80px;
    text-align: right;
}

/* ===== 空状态 ===== */
.weread-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 14px;
    background: #fafafa;
    border-radius: 8px;
}

.weread-empty-inline {
    color: #999;
    font-size: 14px;
    padding: 20px 0;
    text-align: center;
}

/* ===== 链接样式 ===== */
.weread-book-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.weread-book-title-link {
    text-decoration: none;
    color: inherit;
}

.weread-book-title-link:hover .weread-book-title {
    color: #07c160;
}

.weread-book-author a,
.weread-note-book-author a {
    color: #999;
    text-decoration: none;
    transition: color 0.2s;
}

.weread-book-author a:hover,
.weread-note-book-author a:hover {
    color: #07c160;
}

.weread-note-book-title {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.weread-note-book-title:hover {
    color: #07c160;
}

.weread-report-top-title-link {
    color: inherit;
    text-decoration: none;
}

.weread-report-top-title-link:hover .weread-report-top-title {
    color: #07c160;
}

/* ===== 书名字体变小 ===== */
.weread-book-title {
    font-size: 12px;
    line-height: 1.5;
    line-clamp: 2;
    -webkit-line-clamp: 2;
}

/* ===== 封皮叠加层（状态+时长） ===== */
.weread-book-cover {
    position: relative;
}

.weread-book-cover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 35%, rgba(0,0,0,0) 55%, rgba(0,0,0,0.55) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 6px;
    pointer-events: none;
}

.weread-book-card:hover .weread-book-cover-overlay {
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 35%, rgba(0,0,0,0) 55%, rgba(0,0,0,0.7) 100%);
}

.weread-badge-cover {
    align-self: flex-start;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 8px;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.weread-badge-cover.weread-badge-reading {
    background: rgba(46, 125, 50, 0.9);
}

.weread-badge-cover.weread-badge-read {
    background: rgba(21, 101, 192, 0.9);
}

.weread-badge-cover.weread-badge-want_to_read {
    background: rgba(230, 81, 0, 0.9);
}

.weread-book-cover-time {
    align-self: flex-end;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    background: rgba(7, 193, 96, 0.9);
    padding: 1px 6px;
    border-radius: 8px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* ===== 搜索框 ===== */
.weread-search-form {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.weread-search-input {
    flex: 1;
    height: 40px;
    padding: 0 16px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.weread-search-input:focus {
    border-color: #07c160;
}

.weread-search-btn {
    height: 40px;
    padding: 0 24px;
    background: #07c160;
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.weread-search-btn:hover {
    background: #06ad56;
}

/* ===== 书籍详情页 ===== */
.weread-book-detail {
    margin: 20px 0;
}

.weread-book-detail-back {
    margin-bottom: 20px;
}

.weread-book-detail-back a {
    color: #07c160;
    text-decoration: none;
    font-size: 14px;
}

.weread-book-detail-back a:hover {
    text-decoration: underline;
}

.weread-book-detail-header {
    display: flex;
    gap: 24px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 24px;
    margin-bottom: 24px;
}

@media (max-width: 600px) {
    .weread-book-detail-header {
        flex-direction: column;
    }
}

.weread-book-detail-cover {
    flex-shrink: 0;
    width: 160px;
}

.weread-book-detail-cover img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

@media (max-width: 600px) {
    .weread-book-detail-cover {
        width: 120px;
        margin: 0 auto;
    }
}

.weread-book-detail-info {
    flex: 1;
    min-width: 0;
}

.weread-book-detail-title {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin: 0 0 12px;
    line-height: 1.4;
}

.weread-book-detail-author {
    font-size: 15px;
    color: #666;
    margin: 0 0 16px;
}

.weread-book-detail-author a {
    color: #07c160;
    text-decoration: none;
}

.weread-book-detail-author a:hover {
    text-decoration: underline;
}

.weread-book-detail-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.weread-book-detail-time,
.weread-book-detail-progress,
.weread-book-detail-rating {
    font-size: 14px;
    color: #666;
}

.weread-book-detail-rating {
    color: #ff9800;
    font-weight: 600;
}

.weread-book-detail-extra {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #f9f9f9;
    border-radius: 8px;
}

.weread-book-detail-extra-item {
    font-size: 13px;
    color: #888;
}

.weread-book-detail-extra-item:not(:last-child)::after {
    content: '';
}

.weread-book-detail-category,
.weread-book-detail-publisher {
    font-size: 14px;
    color: #666;
}

.weread-book-detail-intro {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.weread-book-detail-intro h4 {
    font-size: 15px;
    color: #333;
    margin: 0 0 8px;
}

.weread-book-detail-intro p {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    margin: 0;
}

.weread-book-detail-notes h3 {
    font-size: 18px;
    color: #333;
    margin: 0 0 16px;
}

/* ===== 作者页 ===== */
.weread-author-page {
    margin: 20px 0;
}

.weread-author-title {
    font-size: 18px;
    color: #333;
    margin: 0 0 20px;
}

/* ===== 搜索结果页 ===== */
.weread-search-results {
    margin: 20px 0;
}

.weread-search-title {
    font-size: 18px;
    color: #333;
    margin: 0 0 20px;
}

.weread-search-section {
    margin-bottom: 32px;
}

.weread-search-section h3 {
    font-size: 16px;
    color: #333;
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

/* ===== 笔记项：左 main + 右 vote 布局 ===== */
.weread-note-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0 0 16px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    transition: box-shadow 0.2s, border-color 0.2s;
}
.weread-note-item:hover {
    border-color: #ddd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.weread-note-main {
    flex: 1;
    min-width: 0;
}

/* ===== 笔记投票按钮（右侧栏） ===== */
.weread-note-vote {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end; /* 按钮右对齐 */
    min-width: 88px;
    padding-left: 8px;
    /* border-left: 1px dashed #eee;  与笔记主体分隔 */
}

.weread-vote-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 76px;
    padding: 5px 10px;
    border: 1px solid #e0e0e0;
    /* 圆角：使用 !important 防止主题 CSS（含通用 button 样式或 reset）覆盖。
       9999px 确保无论按钮尺寸如何都呈胶囊形（两端完全圆形）。 */
    border-radius: 9999px !important;
    background: #fafafa;
    color: #555;
    font-size: 13px;
    line-height: 1.4;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s, opacity 0.2s;
    user-select: none;
}

.weread-vote-btn:hover:not(:disabled) {
    background: #f0f0f0;
    border-color: #ccc;
}

/* 未投票时悬停：轻微提示色 */
.weread-vote-up:hover:not(:disabled):not(.weread-vote-active):not(.weread-vote-blocked) {
    color: #07c160;
    border-color: #07c160;
    background: #f0fff5;
}

.weread-vote-down:hover:not(:disabled):not(.weread-vote-active):not(.weread-vote-blocked) {
    color: #d32f2f;
    border-color: #d32f2f;
    background: #fff5f5;
}

/* 已投票的按钮：填充色 + 加粗，提示"再点取消" */
.weread-vote-btn.weread-vote-active {
    font-weight: 600;
    cursor: pointer;
}
.weread-vote-up.weread-vote-active {
    color: #fff;
    background: #07c160;
    border-color: #07c160;
}
.weread-vote-down.weread-vote-active {
    color: #fff;
    background: #d32f2f;
    border-color: #d32f2f;
}

/* 反向按钮被阻塞（必须先取消）：置灰 + 不能点 */
.weread-vote-btn.weread-vote-blocked {
    cursor: not-allowed;
    opacity: 0.4;
}
.weread-vote-btn.weread-vote-blocked:hover {
    /* 悬停也不变色，避免误导 */
    background: #fafafa;
    border-color: #e0e0e0;
    color: #555;
}

.weread-vote-btn.weread-vote-pending {
    opacity: 0.6;
}

.weread-vote-icon {
    font-size: 14px;
    line-height: 1;
}

.weread-vote-label {
    /* 紧凑布局：只显示 icon + 数字，label 隐藏，悬停时通过 title 提示 */
    display: none;
}

.weread-vote-count {
    min-width: 18px;
    text-align: center;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}

/* ===== 笔记列表项中"详情"链接（图标+文字，无边框） ===== */
.weread-note-detail-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    color: #888;
    font-size: 13px;
    text-decoration: none;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
    line-height: 1.4;
}
.weread-note-detail-link::before {
    content: '🔗';
    font-size: 11px;
    line-height: 1;
}
.weread-note-detail-link:hover {
    color: #07c160;
    background: #f0fff5;
    text-decoration: none;
}

/* ===== 单笔记展示页 ===== */
.weread-single-note {
    max-width: 760px;
    margin: 20px auto;
    padding: 0 4px;
}

.weread-single-note-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}
.weread-single-note-nav-bottom {
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid #eee;
    border-bottom: 0;
    justify-content: flex-start;
}

.weread-back-link,
.weread-book-link {
    color: #2271b1;
    text-decoration: none;
    font-size: 14px;
    transition: color .2s;
}
.weread-back-link:hover,
.weread-book-link:hover {
    color: #135e96;
    text-decoration: underline;
}
.weread-book-link {
    color: #555;
}

.weread-single-note-article {
    background: #fff;
    padding: 24px 28px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    display: flex; /* 与列表页一致：让顶踩按钮与笔记主体并排显示 */
    align-items: flex-start;
    gap: 12px;
}

.weread-single-note-body {
    flex: 1;
    min-width: 0;
}

.weread-single-note-mark {
    margin: 0 0 20px;
    padding: 16px 20px;
    /* background: #faf8f0;
    border-left: 4px solid #f0c060; */
    border-radius: 4px;
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.weread-single-note-thought {
    margin: 0 0 24px;
    padding: 16px 20px;
    background: #f6f8fa;
    border-radius: 4px;
    border: 1px solid #e1e4e8;
}
.weread-single-note-thought-label {
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.weread-single-note-thought-body {
    font-size: 15px;
    line-height: 1.8;
    color: #2c3e50;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.weread-single-note-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 12px 0;
    /* 取消上下的两条虚线（与列表页的元信息行样式靠拢，更简洁） */
    font-size: 13px;
    color: #666;
    margin-bottom: 16px;
}
.weread-meta-item a {
    color: #2271b1;
    text-decoration: none;
}
.weread-meta-item a:hover {
    text-decoration: underline;
}

/* 详情页顶踩容器：与列表页 .weread-note-vote 完全一致 */
.weread-single-note-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
    min-width: 88px;
    flex-shrink: 0;
    padding-left: 8px;
}

/* 在单笔记页也要与列表页一致：只显示 icon + 数字，label 隐藏（悬停时通过 title 提示） */
.weread-single-note-actions .weread-vote-label {
    display: none;
}

.weread-single-note-related {
    /* 统一笔记详情页各模块外框之间的间距 */
    margin-top: 24px;
    padding: 20px 24px;
    background: #fafbfc;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
}
.weread-single-note-related-title {
    /* 与详情页"X条回复"标题样式保持一致：字号 15px、字重 600、底部 1px 实线分隔 */
    font-size: 15px;
    color: #333;
    margin: 0 0 14px;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 6px;
}
.weread-related-title-icon {
    font-size: 16px;
    line-height: 1;
}
.weread-single-note-related-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.weread-single-note-related-list li {
    padding: 8px 0;
    border-bottom: 1px dashed #e0e0e0;
}
.weread-single-note-related-list li:last-child {
    border-bottom: 0;
}
.weread-related-item {
    color: #555;
    text-decoration: none;
    font-size: 13px;
    line-height: 1.6;
    transition: color .2s;
}
.weread-related-item:hover {
    color: #2271b1;
}

.weread-single-note-missing {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

/* 响应式 */
@media (max-width: 768px) {
    .weread-single-note {
        padding: 0 2px;
    }
    .weread-single-note-article {
        padding: 16px 14px;
        flex-direction: column;  /* 移动端：顶踩回到下方 */
    }
    .weread-single-note-actions {
        flex-direction: row;  /* 移动端：横排 */
        border-left: none;
        padding-left: 0;
        padding-top: 8px;
        border-top: 1px dashed #eee;
        min-width: 0;
        align-items: center;
        align-self: stretch;
    }
    .weread-single-note-actions .weread-vote-btn {
        max-width: none;
        flex: 1;
    }
    .weread-single-note-mark {
        font-size: 15px;
        padding: 12px 14px;
    }
    .weread-single-note-meta {
        gap: 8px;
        font-size: 12px;
    }
    .weread-single-note-replies-section {
        padding: 16px 14px;
    }
}

/* ===== 撤销 Toast（取消投票后 5 秒内可点击恢复） ===== */
.weread-vote-undo-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #2c2c2c;
    color: #fff;
    padding: 10px 18px;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    z-index: 99999;
    font-size: 14px;
    line-height: 1.4;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

.weread-vote-undo-toast.weread-vote-undo-toast-show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.weread-vote-undo-link {
    color: #4cd964;
    margin-left: 6px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.weread-vote-undo-link:hover {
    text-decoration: underline;
}

/* ===== 笔记排行页 ===== */
.weread-ranking-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
    padding: 12px 14px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 8px;
}

.weread-ranking-toolbar-label {
    font-size: 13px;
    color: #666;
    margin-right: 4px;
}

.weread-sort-btn {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 14px;
    background: #fff;
    color: #555;
    font-size: 13px;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.weread-sort-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.weread-sort-btn.active {
    background: #07c160;
    border-color: #07c160;
    color: #fff;
    font-weight: 500;
}

.weread-ranking-count {
    margin-left: auto;
    font-size: 13px;
    color: #999;
}

.weread-ranking-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.weread-ranking-item {
    display: flex;
    gap: 16px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.weread-ranking-item:hover {
    border-color: #ddd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.weread-ranking-item .weread-note-item {
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}
.weread-ranking-item .weread-note-item:hover {
    border: none;
    background: transparent;
    box-shadow: none;
}

.weread-ranking-rank {
    flex-shrink: 0;
    width: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 4px;
    border-right: 1px dashed #eee;
    padding-right: 14px;
}

.weread-ranking-num {
    font-size: 24px;
    font-weight: 700;
    color: #999;
    line-height: 1;
}

.weread-ranking-item.weread-ranking-item-top1 .weread-ranking-num {
    color: #f56c2a;
}

.weread-ranking-item.weread-ranking-item-top2 .weread-ranking-num {
    color: #f8b500;
}

.weread-ranking-item.weread-ranking-item-top3 .weread-ranking-num {
    color: #c29545;
}

.weread-ranking-votes {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    font-size: 12px;
    color: #666;
}

.weread-ranking-likes {
    color: #07c160;
    font-weight: 500;
}

.weread-ranking-dislikes {
    color: #d32f2f;
    font-weight: 500;
}

.weread-ranking-ratio {
    color: #999;
    font-size: 11px;
    padding-top: 2px;
}

/* ===== 读书笔记回复 ===== */
.weread-note-replies-entry {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed #eee;
    font-size: 13px;
}

/* 回复入口行：回复按钮 + 详情链接 等并排显示 */
.weread-note-replies-row {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
/* 详情链接与回复按钮同行时的微调 */
.weread-note-replies-row .weread-note-detail-link {
    margin-left: 0;
    padding: 2px 8px;
}

/* 详情页回复模块：独立 section，与博客评论风格一致 */
.weread-single-note-replies-section {
    /* 统一笔记详情页各模块外框之间的间距 */
    margin-top: 24px;
    background: #fff;
    padding: 20px 28px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.weread-single-note-replies-section .weread-replies-panel-inner {
    font-size: 14px;
}
.weread-single-note-replies-section .weread-replies-header {
    margin-bottom: 14px;
    font-size: 15px;
    color: #333;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 6px;
}
.weread-single-note-replies-section .weread-replies-title-icon {
    font-size: 16px;
    line-height: 1;
}
.weread-single-note-replies-section .weread-replies-count-text {
    color: #333;
}
.weread-single-note-replies-section .weread-replies-count-num {
    color: #07c160;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    margin: 0 2px;
}
.weread-single-note-replies-section .weread-replies-items {
    margin-bottom: 16px;
}

/* 详情页回复表单区：与通用 .weread-reply-form-area 保持完全一致（同卡片样式），
   这里只做最小调整，让两处（列表页/详情页）走同一条视觉规则。 */
/* 注：标题已从 form-area 中移出（与"X条回复"同级的 .weread-replies-header），
   故 .weread-reply-form-area 内不再需要额外的标题相关样式。 */

/* ===== 区块标题样式（"✍️ 发表评论" 与 "💬 X条回复" 复用） ===== */
.weread-replies-header-hint {
    margin-left: auto;
    font-size: 12px;
    font-weight: 400;
    color: #999;
}

/* 内联到子评论下方的回复表单：加一条虚线分隔 + 顶部留白
   （普通位置在 form-area 卡片中，不需要这条线） */
.weread-reply-form-inline {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #eee;
}

/* 列表页/详情页统一的"回复"按钮：图标+文字，无边框 */
.weread-reply-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: transparent;
    border: none;
    color: #888;
    font-size: 13px;
    line-height: 1.5;
    font-family: inherit;
    cursor: pointer;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
    vertical-align: middle;
}
.weread-reply-toggle-btn::before {
    content: '💬';
    font-size: 12px;
    line-height: 1;
}
.weread-reply-toggle-btn:hover {
    color: #07c160;
    background: #f0fff5;
}
.weread-reply-toggle-btn:disabled {
    color: #aaa;
    cursor: pointer; /* 仍可点击以取消 */
}
.weread-reply-toggle-btn .weread-replies-count {
    color: inherit;
    font-variant-numeric: tabular-nums;
}

/* 强制覆盖 <a> 默认样式，与回复按钮完全一致 */
.weread-note-replies-row .weread-note-detail-link,
.weread-note-replies-row .weread-reply-toggle-btn {
    color: #888;
    font-size: 13px;
    line-height: 1.5;
    padding: 4px 8px;
    vertical-align: middle;
}

.weread-replies-panel {
    margin-top: 10px;
    padding: 12px;
    background: #fafbfc;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
}

.weread-replies-panel-inner {
    font-size: 13px;
    line-height: 1.6;
}

.weread-replies-header {
    margin-bottom: 10px;
    color: #555;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.weread-replies-title-icon {
    font-size: 14px;
    line-height: 1;
}

.weread-replies-count-text {
    color: #555;
}

/* "X 条回复" 标题中的数字加粗（强调计数） */
.weread-replies-count-num {
    color: #07c160;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    margin: 0 2px;
}

.weread-replies-items {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
    /* 用 flex + gap 给一级回复之间留出明确且可靠的间距，
       避免 margin-bottom 受 margin-collapse / last-child 规则影响 */
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* 嵌套回复的子层：左边距 + 左边线突出层级 */
.weread-replies-children {
    list-style: none;
    margin: 10px 0 0 0;
    padding: 0 0 0 14px;
    border-left: 2px solid #e8f5e9;
    /* 嵌套子层也用 flex + gap 留出层级内间距 */
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.weread-reply-item {
    padding: 12px 14px;
    /* 间距已由父级 .weread-replies-items / .weread-replies-children 的 gap 控制，
       这里不再用 margin-bottom（避免双重间距） */
    margin-bottom: 0;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.weread-reply-item:hover {
    border-color: #d0d0d0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}
.weread-reply-item:last-child {
    margin-bottom: 0;
}
/* 嵌套子层回复：去掉卡片边框/阴影，保留左边线区分层级 */
.weread-replies-children .weread-reply-item {
    padding: 8px 10px;
    /* 子层间距由父 .weread-replies-children 的 gap 控制 */
    margin-bottom: 0;
    background: #fafbfc;
    border: 1px dashed #eef0f3;
    box-shadow: none;
}
.weread-replies-children .weread-reply-item:hover {
    box-shadow: none;
    border-color: #e0e0e0;
}
.weread-reply-child {
    /* 子层评论：内边距略小一些 */
    font-size: 12px;
}
.weread-reply-child .weread-reply-content {
    font-size: 12px;
    line-height: 1.6;
}
.weread-reply-child .weread-reply-meta {
    font-size: 11px;
}

.weread-reply-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
    font-size: 12px;
    color: #999;
    flex-wrap: wrap;
}

.weread-reply-author {
    color: #555;
    font-weight: 700;
    text-decoration: none;
}
a.weread-reply-author:hover {
    color: #07c160;
    text-decoration: underline;
}

.weread-reply-time {
    color: #aaa;
}

/* 回复/编辑/删除 操作按钮统一放右侧 */
.weread-reply-actions {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.weread-reply-actions button {
    background: none;
    border: none;
    color: #888;
    font-size: 12px;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.15s;
}
.weread-reply-actions button:hover {
    color: #07c160;
}
.weread-reply-reply-btn {
    color: #888 !important;
}
.weread-reply-edit-btn {
    color: #007cba !important;
}
.weread-reply-edit-btn:hover {
    color: #005a87 !important;
    text-decoration: underline;
}
.weread-reply-delete-btn {
    color: #cc0000 !important;
}
.weread-reply-delete-btn:hover {
    color: #aa0000 !important;
    text-decoration: underline;
}
.weread-reply-actions button:disabled {
    color: #ccc !important;
    cursor: not-allowed;
    text-decoration: none;
}

/* 2 分钟编辑窗口提示徽章 */
.weread-reply-2min-hint {
    display: inline-block;
    padding: 1px 8px;
    background: #fff3cd;
    color: #856404;
    border-radius: 10px;
    font-size: 11px;
    line-height: 1.6;
    border: 1px solid #ffeaa7;
    animation: weread-reply-hint-pulse 1.5s ease-in-out infinite;
}
@keyframes weread-reply-hint-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.weread-reply-content {
    color: #333;
    word-wrap: break-word;
}
.weread-reply-content p {
    margin: 0;
}

/* 行内编辑框 */
.weread-reply-edit-box {
    margin-top: 4px;
}
.weread-reply-edit-box textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
}
.weread-reply-edit-box textarea:focus {
    outline: none;
    border-color: #007cba;
}
.weread-reply-edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 6px;
}
.weread-reply-edit-actions button {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}
.weread-reply-edit-cancel-btn {
    color: #666;
}
.weread-reply-edit-cancel-btn:hover {
    background: #f5f5f5;
}
.weread-reply-edit-save-btn {
    color: #fff;
    background: #07c160 !important;
    border-color: #07c160 !important;
}
.weread-reply-edit-save-btn:hover {
    background: #06ad56 !important;
    border-color: #06ad56 !important;
}
.weread-reply-edit-save-btn:disabled {
    background: #aaa !important;
    border-color: #aaa !important;
    cursor: not-allowed;
}

.weread-replies-empty {
    color: #999;
    font-size: 13px;
    margin: 0 0 12px;
    padding: 18px 12px;
    text-align: center;
    background: #fafafa;
    border: 1px dashed #e8e8e8;
    border-radius: 6px;
}

.weread-reply-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
    /* 顶部不再固定加 padding/border：
       - 在 form-area 卡片中由 .weread-reply-form-area 的 padding 负责
       - 在内联模式（.weread-reply-form-inline）下用专用规则加 */
}
.weread-reply-form-guest {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.weread-reply-form-guest input {
    flex: 1 1 140px;
    min-width: 0;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background: #fff;
    box-sizing: border-box;
}
.weread-reply-form-guest input:focus {
    outline: none;
    border-color: #07c160;
}
.weread-reply-form textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
    transition: border-color 0.15s;
}
.weread-reply-form textarea:focus {
    outline: none;
    border-color: #007cba;
}

.weread-reply-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.weread-reply-form-hint {
    font-size: 12px;
    color: #aaa;
    flex: 1;
}

/* 嵌套回复时的"取消"按钮：次要按钮样式 */
.weread-reply-cancel-btn {
    background: #fff;
    border: 1px solid #ddd;
    color: #666;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    line-height: 1.4;
}
.weread-reply-cancel-btn:hover {
    border-color: #cc0000;
    color: #cc0000;
    background: #fff5f5;
}

.weread-reply-submit-btn {
    background: #007cba;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 6px 16px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s;
}
.weread-reply-submit-btn:hover {
    background: #005a87;
}
.weread-reply-submit-btn:disabled {
    background: #aaa;
    cursor: not-allowed;
}

.weread-replies-error {
    color: #cc0000;
    font-size: 13px;
    margin: 0;
}

/* 回复表单区：与一级回复项保持一致的卡片样式（白底、深边框、同 padding/border-radius），
   这样视觉上"发表评论"容器与回复列表就像同一系列的卡片。
   margin-bottom 加大到 20px，让两个模块之间有清晰的视觉留白。 */
.weread-reply-form-area {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 20px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.weread-reply-form-area:focus-within {
    /* 表单区域获得焦点时（开始填写）边框加深、添加轻阴影，提升交互感 */
    border-color: #07c160;
    box-shadow: 0 2px 6px rgba(7, 193, 96, 0.08);
}
/* 注：标题已从 form-area 中移出（与"X条回复"同级的 .weread-replies-header），
   故 .weread-reply-form-area 内不再需要额外的标题相关样式。 */

/* ===== "待审核"提示条（评论提交后等待管理员审核时的反馈） ===== */
.weread-reply-pending-notice {
    margin-bottom: 12px;
    padding: 10px 14px;
    background: #fff7e6;
    border: 1px solid #ffd591;
    border-radius: 9999px;
    color: #ad6800;
    font-size: 13px;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 6px;
}
.weread-reply-pending-notice::before {
    content: "⏳";
    font-size: 14px;
}

/* ===== 一级回复分页（仅对顶层 li 分页，子层不参与分页） ===== */
.weread-replies-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    margin: 12px 0 4px;
    padding: 8px 0;
    font-size: 12px;
    color: #999;
}
.weread-replies-page-btn,
.weread-replies-page-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #fff;
    color: #555;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    font-size: 12px;
    line-height: 1;
}
.weread-replies-page-btn:hover,
.weread-replies-page-num:hover {
    background: #f0fff5;
    color: #07c160;
    border-color: #07c160;
    text-decoration: none;
}
.weread-replies-page-current {
    background: #07c160;
    border-color: #07c160;
    color: #fff;
    font-weight: 600;
    cursor: default;
    pointer-events: none;
}
.weread-replies-page-ellipsis {
    color: #aaa;
    padding: 0 4px;
    font-size: 12px;
}
.weread-replies-page-info {
    color: #aaa;
    font-size: 11px;
    margin-left: auto;
}

/* 移动端适配 */
@media (max-width: 600px) {
    .weread-replies-panel {
        padding: 10px;
    }
    .weread-reply-meta {
        flex-wrap: wrap;
    }
    .weread-reply-actions {
        margin-left: 0;
        width: 100%;
        justify-content: flex-end;
        margin-top: 4px;
    }
    /* 嵌套缩进在移动端要小一些 */
    .weread-replies-children {
        padding-left: 8px;
    }
    .weread-reply-2min-hint {
        font-size: 10px;
    }
    .weread-reply-item {
        padding: 8px 10px;
    }
    .weread-replies-pagination {
        gap: 3px;
    }
    .weread-replies-page-btn,
    .weread-replies-page-num {
        min-width: 26px;
        height: 26px;
        padding: 0 6px;
        font-size: 11px;
    }
    .weread-reply-form-area {
        padding: 10px 12px;
    }
    /* 笔记详情页各模块外框间距：移动端保持统一 */
    .weread-single-note-related,
    .weread-single-note-replies-section {
        margin-top: 16px;
    }
}

@media (max-width: 640px) {
    /* 笔记项：移动端投票栏放在底部，仍然靠右 */
    .weread-note-item {
        flex-direction: column;
        gap: 8px;
    }
    .weread-note-vote {
        flex-direction: row;
        align-items: center;
        align-self: flex-end;
        border-left: none;
        padding-left: 0;
        padding-top: 8px;
        border-top: 1px dashed #eee;
        min-width: 0;
    }

    /* 排行项：移动端变成垂直堆叠 */
    .weread-ranking-item {
        flex-direction: column;
        gap: 10px;
    }
    .weread-ranking-rank {
        flex-direction: row;
        width: 100%;
        border-right: none;
        border-bottom: 1px dashed #eee;
        padding-right: 0;
        padding-bottom: 10px;
        gap: 12px;
    }
    .weread-ranking-num {
        font-size: 18px;
    }
    .weread-ranking-votes {
        flex-direction: row;
        margin-top: 0;
        gap: 10px;
    }
}