/* 刀2（6/21 AI 共读）: 多作者评论显示 —— 回复指向 + 评论操作入口的样式。
   配合 reader-comments.js + script.js openAnnotationNotes + bookshelf.js renderReviewsPane。
   复用现有 .rdr-comment / .rdr-comment-body 容器，只补 reply 前缀 + 行内操作。 */

/* Round B: 目录/书签/笔记 弹窗全屏（原 85vh 底部 sheet + 内部 380px 列表太小，塔拉要全屏） */
#modal-reader-catalog { align-items: stretch; }
#modal-reader-catalog .sheet {
    width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh;
    border-radius: 0; display: flex; flex-direction: column; padding: max(16px, env(safe-area-inset-top)) 16px max(12px, env(safe-area-inset-bottom));
}
#modal-reader-catalog .reader-lib-pane { flex: 1; min-height: 0; flex-direction: column; }
#modal-reader-catalog #reader-catalog-list,
#modal-reader-catalog #reader-notes-list,
#modal-reader-catalog #bookmarks-list { flex: 1; min-height: 0; max-height: none !important; overflow-y: auto; }
#modal-reader-catalog .sheet > button:last-child { flex-shrink: 0; }

/* Round B: 笔记列表「全部/我的/AI」子tab（阅读器目录笔记 + 书详情笔记 tab 共用） */
.rdr-notes-filter { display: flex; gap: 6px; margin-bottom: 12px; }
.rdr-nf-tab { flex: 1; text-align: center; padding: 6px 4px; border-radius: 9px; font-size: 0.78rem; cursor: pointer;
    background: rgba(var(--accent-rgb), 0.06); color: var(--text); opacity: 0.7; user-select: none; transition: all 0.15s; }
.rdr-nf-tab.active { background: var(--accent); color: var(--bg); opacity: 1; font-weight: 600; }
.rdr-nf-tab:active { transform: scale(0.97); }
.rdr-nf-n { font-size: 0.66rem; opacity: 0.7; margin-left: 4px; }

/* 「X 回复 Y · 」前缀 */
.rc-reply-to {
    color: var(--accent);
    opacity: 0.85;
    font-size: 0.72rem;
    margin-right: 2px;
}
.rc-reply-to b {
    font-weight: 600;
}

/* 每条评论的行内操作（回复 / 发送） */
.rc-comment-acts {
    display: inline-flex;
    gap: 10px;
    margin-left: 8px;
    vertical-align: baseline;
}
.rc-comment-acts span {
    font-size: 0.66rem;
    opacity: 0.5;
    cursor: pointer;
    user-select: none;
}
.rc-comment-acts span:hover {
    opacity: 1;
    color: var(--accent);
}
.rc-comment-acts span:active {
    transform: scale(0.94);
}

/* 刀2.5: 共读卡片（coread_card）—— 复用 .structured-card.sc-ded 外壳，这里补共读专属内容样式 */
.sc-cr-card .sc-body { padding: 12px 14px; }
/* Round B: 卡片头 = 封面 + 书名 + 作者 */
.sc-cr-bookrow { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 8px; }
.sc-cr-cover { width: 46px; height: 62px; object-fit: cover; border-radius: 4px; flex-shrink: 0; box-shadow: 0 1px 5px rgba(0,0,0,0.18); }
.sc-cr-bookmeta { min-width: 0; }
.sc-cr-author { font-size: 0.74rem; opacity: 0.6; margin-top: 2px; }
.sc-cr-book { font-size: 0.92rem; font-weight: 700; margin-bottom: 4px; }
.sc-cr-loc { font-size: 0.7rem; color: var(--accent); opacity: 0.9; margin-bottom: 8px; }
.sc-cr-quote {
    font-size: 0.84rem;
    line-height: 1.5;
    color: var(--text);
    opacity: 0.82;
    background: rgba(var(--accent-rgb), 0.06);
    border-left: 3px solid var(--accent);
    border-radius: 0 8px 8px 0;
    padding: 8px 10px;
    margin-bottom: 10px;
    white-space: pre-wrap;
    word-break: break-word;
}
.sc-cr-list { display: flex; flex-direction: column; gap: 11px; }
.sc-cr-comment { display: flex; gap: 9px; align-items: flex-start; }
/* 刀4: 结构化卡片——每条笔记一组，子评论缩进挂在它下面 */
.sc-cr-group { display: flex; flex-direction: column; gap: 8px; padding-bottom: 4px; }
.sc-cr-group + .sc-cr-group { border-top: 1px dashed rgba(var(--accent-rgb), 0.16); padding-top: 11px; }
.sc-cr-note .sc-cr-name { font-weight: 700; }
.sc-cr-subs { display: flex; flex-direction: column; gap: 8px; margin-left: 16px; padding-left: 13px; border-left: 2px solid rgba(var(--accent-rgb), 0.18); }
.sc-cr-sub .sc-cr-av { width: 24px; height: 24px; }
.sc-cr-sub .sc-cr-cbody { font-size: 0.78rem; opacity: 0.92; }
.sc-cr-av {
    width: 30px; height: 30px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    margin-top: 1px;
}
.sc-cr-cbody { font-size: 0.82rem; line-height: 1.5; word-break: break-word; }
.sc-cr-name { font-weight: 600; margin-right: 6px; }
.sc-cr-tag {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0 5px;
    border-radius: 6px;
    background: var(--accent);
    color: var(--bg);
    margin-right: 6px;
    vertical-align: 1px;
}
.sc-cr-empty { font-size: 0.8rem; opacity: 0.5; }
