/* A task's comments read as one chat, in the order they were written, with one active editor. */
.comment-row { display:flex;align-items:flex-end;gap:8px;min-width:0; }
.comment-row.is-own { justify-content:flex-end; }
.comment-avatar { display:flex;flex-shrink:0;margin-bottom:2px; }.comment-avatar>.avatar { border-radius:6px; }
/* Everyone else's bubble is the comment surface and the person's own is tinted; the corner nearest each side is squared off. */
.comment-row>.tl-cmt { --comment-surface:color-mix(in srgb,var(--surface-raised) 65%,var(--surface-canvas));--description-blur-surface:var(--comment-surface);min-width:0;max-width:min(85%,720px);margin:0;padding:8px 12px 4px;border-color:color-mix(in srgb,var(--line) 65%,transparent);border-radius:var(--radius-lg) var(--radius-lg) var(--radius-lg) var(--radius-xs);background:var(--comment-surface); }
.comment-row.is-own>.tl-cmt { --comment-surface:color-mix(in srgb,var(--run) 12%,var(--surface-raised));border-radius:var(--radius-lg) var(--radius-lg) var(--radius-xs) var(--radius-lg); }
.comment-row.is-editing>.tl-cmt { flex:1;max-width:none;padding:12px; }
.comment-row>.tl-cmt.is-reply-target { border-color:color-mix(in srgb,var(--run) 55%,transparent); }
.cmt-author { display:block;overflow-wrap:anywhere;font-size:var(--text-sm);line-height:1.4;font-weight:500;color:var(--ink-soft); }
.comment-reading { display:flex;min-width:0;flex-direction:column;align-items:stretch; }
.comment-reading .description-preview { min-width:0; }
.comment-reading.is-collapsed .description-preview::after { content:"";position:absolute;inset:auto 0 0;height:112px;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);background:color-mix(in srgb,var(--description-blur-surface,var(--surface-canvas)) 15%,transparent);mask-image:linear-gradient(to bottom,transparent,#000 85%);-webkit-mask-image:linear-gradient(to bottom,transparent,#000 85%);pointer-events:none; }
.comment-reading .comment-body-content { box-sizing:border-box;margin-top:2px;overflow-wrap:anywhere; }
/* A comment has no frame around it, so the cut-off text fades into the card instead of ending at an edge. */
.comment-reading.is-collapsed .comment-body-content { mask-image:linear-gradient(to bottom,#000 calc(100% - 56px),transparent);-webkit-mask-image:linear-gradient(to bottom,#000 calc(100% - 56px),transparent); }
.comment-reading .description-toggle { margin-top:6px; }
/* The comment a reply answers: its author and first line, one press away. */
.reply-reference { display:flex;flex-direction:column;align-items:stretch;gap:1px;width:100%;min-width:0;margin:4px 0;padding:4px 8px;border:0;border-left:2px solid var(--run);border-radius:var(--radius-xs);background:var(--fill-hover);color:var(--ink-muted);font:inherit;font-size:var(--text-sm);line-height:1.4;text-align:left;cursor:pointer; }
.reply-reference>strong { font-weight:500;color:var(--ink-soft); }
/* The quoted line reads from its own side, as comments do, and is cut at its end; its dir="auto" puts WebKit's ellipsis there too. */
.reply-reference>span { overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-align:start; }
.reply-reference:hover { background:var(--fill-selected); }
.comment-actions { display:flex;align-items:center;gap:4px;margin-top:2px; }
.comment-actions .reply-action { min-height:30px;padding:4px 7px;margin-left:-7px;font-size:var(--text-sm);gap:6px;color:var(--ink-muted); }
.comment-actions .reply-action:hover,.comment-actions .reply-action[aria-pressed=true] { color:var(--ink);background:var(--fill-hover); }
.comment-actions .act-time { margin-left:auto;padding-left:12px;font-size:var(--text-xs);white-space:nowrap; }
.comment-actions .comment-menu-button { width:28px;height:28px;min-width:28px;min-height:28px;padding:6px;margin-right:-6px;color:var(--ink-muted);opacity:.7; }
.tl-cmt:hover .comment-menu-button,.comment-menu-button:focus-visible { opacity:1; }
.comment-removed { color:var(--ink-muted);font-size:var(--text-label); }
/* The line between comments shown only as context and the first comment read. */
.comment-gap { display:flex;align-items:center;gap:12px;margin:6px 0;color:var(--ink-muted);font-size:var(--text-sm); }
.comment-gap::before,.comment-gap::after { content:"";flex:1;border-top:1px solid var(--line-strong); }
.task-layout .inline-composer { margin-top:10px; }
.inline-composer { padding:14px;border:1px solid var(--line-strong);border-radius:var(--radius-md);background:var(--surface-canvas); }
.reply-context { display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px;font-size:var(--text-sm);color:var(--ink-muted); }
.reply-context-main { min-width:0;flex:1;overflow-wrap:anywhere; }.reply-context-main>strong { display:flex;align-items:center;gap:6px;color:var(--ink);font-size:var(--text-label);font-weight:500; }
.reply-context-quote { display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin-top:6px;color:var(--ink-muted);font-size:var(--text-sm);line-height:1.5;white-space:pre-line; }
.reply-context>.btn { flex-shrink:0;font-size:var(--text-sm);min-height:28px;padding:3px 7px; }
/* Above the box at the foot, what a reply answers is marked as it is inside a bubble. */
.comment-composer-home .reply-context { margin-bottom:8px;padding:6px 6px 6px 10px;border-left:2px solid var(--run);border-radius:var(--radius-xs);background:var(--fill-hover); }
.inline-composer textarea { min-height:88px; }
.comment-composer-home:empty { display:none; }
@media(max-width:520px) { .comment-row>.tl-cmt { max-width:92%; }.inline-composer { padding:12px; } }
@media(pointer:coarse) { .comment-actions .comment-menu-button { width:36px;min-width:36px;min-height:44px;opacity:1; }.comment-actions .reply-action,.reply-reference,.reply-context>.btn { min-height:44px; } }

/* Saving places the reading cursor here; it is not a selected message. */
.tl-cmt.comment-save-focus:focus-visible { outline:none; }
