.reader[data-reader-book]{padding-bottom:16px}
.chapter-discussion{max-width:780px;margin:36px auto 0;padding-top:28px;border-top:1px solid var(--line);color:var(--ink)}
.discussion-heading h2{display:flex;align-items:center;gap:10px;margin:8px 0;font-size:1.4rem}
.discussion-heading h2 svg{width:24px;height:24px;flex:none;color:var(--accent)}
.comment-composer{padding:20px;border:1px solid var(--line);border-radius:16px;background:var(--surface);margin:20px 0}
.comment-composer>label{font-weight:700;display:block;margin-bottom:10px}
.comment-composer textarea{display:block;width:100%;min-height:104px;resize:vertical;font:inherit;font-size:16px;line-height:1.6;background:var(--surface);color:var(--ink);border:1px solid var(--line-strong);border-radius:10px;padding:12px}
.comment-composer-meta{display:flex;gap:8px 18px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin:10px 0}
.comment-composer .check{min-height:44px;margin:0;font-size:.85rem}
.comment-composer input[type=checkbox]{width:18px;height:18px}
.comment-actions,.comment-toolbar{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.chapter-discussion .button{min-height:44px;white-space:normal}
.comment-toolbar{margin-top:24px}
.comment-toolbar [aria-pressed=true]{background:var(--surface-accent);color:var(--accent);border-color:var(--accent)}
.comment-card{min-width:0;padding:22px 0;overflow-wrap:anywhere;scroll-margin-top:24px}
.comment-root{border-bottom:1px solid var(--line)}
.comment-entry{display:grid;grid-template-columns:36px minmax(0,1fr);gap:12px;align-items:start}
.comment-content{min-width:0}
.comment-content>header{display:flex;align-items:baseline;gap:4px 10px;flex-wrap:wrap;min-height:24px}
.comment-avatar{width:36px;height:36px;display:grid;place-items:center;background:var(--surface-accent);color:var(--accent);border-radius:50%;font-size:.9rem;font-weight:700}
.comment-date,.comment-address{font-size:.75rem;line-height:1.6;color:var(--muted);margin:0}
.comment-card strong{font-size:.9rem;line-height:1.6}
.comment-body{white-space:pre-wrap;line-height:1.75;font-size:.95rem;margin:6px 0 2px;color:var(--ink)}
.comment-content>.comment-actions{gap:4px 12px}
.chapter-discussion .comment-text-action{background:transparent;border:0;border-radius:6px;padding:7px 2px;color:var(--accent);font-size:.78rem;font-weight:650;line-height:1.5;box-shadow:none}
.chapter-discussion .comment-text-action:hover{background:var(--surface-hover);color:var(--accent)}
.chapter-discussion .comment-text-action:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.comment-spoiler{margin:8px 0;border:1px solid var(--line);border-radius:10px;padding:0 12px;background:var(--surface-soft)}
.comment-spoiler summary{cursor:pointer;min-height:44px;display:list-item;padding:10px 0;color:var(--accent);font-weight:600;font-size:.85rem}
/* Branch stems stop at the parent's own message; children form a separate branch. */
.comment-children{margin:4px 0 0 18px;padding:0 0 0 26px;min-width:0}
.comment-children[hidden]{display:none}
.comment-reply{position:relative;padding:18px 0 6px;border:0}
.comment-reply::before{content:"";position:absolute;left:-26px;top:0;width:20px;height:36px;border-left:1px solid var(--line-strong);border-bottom:1px solid var(--line-strong);border-bottom-left-radius:12px;pointer-events:none}
.comment-reply>.comment-entry{position:relative}
.comment-reply>.comment-entry::before{content:"";position:absolute;left:-26px;top:-18px;bottom:-6px;border-left:1px solid var(--line-strong);pointer-events:none}
.comment-reply>.comment-children{margin-left:64px}
.comment-reply>.comment-children-compact{margin-left:0;padding-left:18px}
.comment-children-compact>.comment-reply::before{left:-18px;width:12px}
.comment-children-compact>.comment-reply>.comment-entry::before{left:-18px}
.comment-depth-capped>.comment-children{margin-left:0;padding-left:0}
.comment-depth-capped>.comment-children>.comment-reply::before,.comment-depth-capped>.comment-children>.comment-reply>.comment-entry::before{display:none}
[data-reply-slot]>.comment-composer{margin:12px 0 8px;padding:16px;background:var(--surface)}
[data-reply-slot]>.comment-composer textarea{min-height:88px}
.comment-featured>.comment-entry>.comment-content{background:var(--surface-accent);border-radius:10px;outline:6px solid var(--surface-accent)}
.comment-auto-loader{min-height:24px;margin:12px 0;font-size:.75rem;color:var(--muted)}
.comment-missing>p{margin:0;padding:12px 0;color:var(--muted)}
.comment-empty,.comment-invite{padding:22px;border:1px dashed var(--line-strong);border-radius:14px;background:var(--surface);color:var(--muted);margin:20px 0}
.comment-invite p{margin-top:0}
[data-comment-status]:empty{display:none}
@media(max-width:760px){
 .chapter-discussion{margin-top:28px;padding-top:22px}.comment-composer{padding:14px}
 .comment-entry{grid-template-columns:30px minmax(0,1fr);gap:9px}.comment-avatar{width:30px;height:30px;font-size:.8rem}
 .comment-content>header{gap:1px 8px}.comment-card{padding:18px 0}.comment-card strong{font-size:.85rem}.comment-date{font-size:.68rem}.comment-body{font-size:.9rem}
 .comment-children{margin-left:15px;padding-left:17px}.comment-reply{padding:16px 0 4px}.comment-reply::before{left:-17px;width:12px;height:31px}
 .comment-reply>.comment-entry::before{left:-17px;top:-16px;bottom:-4px}.comment-reply>.comment-children{margin-left:40px}
 .comment-reply>.comment-children-compact{margin-left:0;padding-left:10px}.comment-children-compact>.comment-reply::before{left:-10px;width:7px}.comment-children-compact>.comment-reply>.comment-entry::before{left:-10px}
 .comment-depth-deep>.comment-children{margin-left:0;padding-left:0}.comment-depth-deep>.comment-children>.comment-reply::before,.comment-depth-deep>.comment-children>.comment-reply>.comment-entry::before{display:none}
 [data-reply-slot]>.comment-composer{padding:12px}.comment-content>.comment-actions{gap:2px 10px}
 .chapter-discussion .button{font-size:.8rem;padding:9px 12px}.chapter-discussion .comment-text-action{padding:7px 2px;font-size:.75rem}
 .comment-actions{gap:6px}
}
