.collab-comments {
 margin: 2rem 0 3rem;
 padding: clamp(1rem, 3vw, 2rem);
 color: #edf1f3;
 background: #161c23;
 border: 1px solid #333e48;
 border-radius: 16px;
}

.collab-comments[hidden],
.collab-comments [hidden] { display: none !important; }

.collab-comments-header,
.collab-comment-meta,
.collab-comment-person,
.collab-comment-context {
 display: flex;
 align-items: center;
 flex-wrap: wrap;
 gap: .5rem .75rem;
}

.collab-comments-header h2 { margin: 0; font-size: clamp(1.35rem, 2.5vw, 1.75rem); }
.collab-comments-count,
.collab-comments-status,
.collab-comment-date,
.collab-comment-in-reply { color: #adbcc4; font-size: .85rem; }
.collab-comments-status { margin: .75rem 0; }
.collab-comments-status:empty,
.collab-comment-target:empty { display: none; }

.collab-comments-list,
.collab-comments-replies {
 display: grid;
 gap: .7rem;
 margin: 1rem 0 0;
 padding: 0;
 list-style: none;
}

.collab-comments-list:empty { margin: 0; }
.collab-comments-replies {
 margin: .55rem 0 0 clamp(.4rem, 3vw, 1.35rem);
 padding-inline-start: .75rem;
 border-inline-start: 1px solid #41515e;
}

.collab-comment {
 padding: .85rem 1rem;
 border: 1px solid #34424d;
 border-radius: 10px;
 background: #1b232d;
 overflow-wrap: anywhere;
 scroll-margin-block: 6rem;
}

.collab-comment:focus { outline: 2px solid #ffbb83; outline-offset: 2px; }
.collab-comment-meta { min-width: 0; }
.collab-comment-person { gap: .35rem .6rem; }
.collab-comment-avatar {
 position: relative; display: inline-grid; place-items: center; flex: 0 0 auto;
 width: 28px; height: 28px; overflow: hidden; border: 1px solid #ffb36666; border-radius: 50%;
 background: #382b23; color: #ffcfaa; font: 700 10px system-ui, sans-serif;
}
.collab-comment-avatar img {
 position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0;
}
.collab-comment-avatar.has-avatar img { opacity: 1; }
.collab-comment-avatar.has-avatar .collab-comment-avatar-initials { visibility: hidden; }
.collab-comment-friend-feedback { color: #adbcc4; font-size: .8rem; }
.collab-comment-friend-feedback:empty { display: none; }
.collab-comment-author {
 color: #ffbe89;
 text-underline-offset: .2em;
 font-weight: 650;
}

.collab-comment-text { margin: .55rem 0 .4rem; white-space: pre-wrap; }
.collab-comment-in-reply { margin: .45rem 0 -.2rem; }
.collab-comment-action,
.collab-comment-time {
 border: 0;
 border-radius: 4px;
 background: transparent;
 color: #a9dfcb;
 cursor: pointer;
 font: inherit;
 font-size: .83rem;
 padding: .25rem .35rem;
}

.collab-comment-action:hover,
.collab-comment-action:focus-visible { text-decoration: underline; }
.collab-comment-friend { visibility: hidden; }
.collab-comment-person:hover .collab-comment-friend,
.collab-comment-person:focus-within .collab-comment-friend { visibility: visible; }
@media (hover: none) { .collab-comment-friend { visibility: visible; } }

.collab-comment-time {
 background: #29392f;
 color: #c1e7cd;
 font-variant-numeric: tabular-nums;
}

.collab-comment-time-static { display: inline-block; cursor: default; }
.collab-comment-form {
 display: grid;
 justify-items: start;
 gap: .75rem;
 margin-top: 1.25rem;
 padding-top: 1rem;
 border-top: 1px solid #3a4752;
}

.collab-comment-context:has(.collab-comment-target:empty) { display: none; }
.collab-comment-target { color: #a9dfcb; margin: 0; }
.collab-comment-label { width: 100%; display: grid; gap: .4rem; }
.collab-comment-input {
 box-sizing: border-box;
 width: 100%;
 min-height: 5.5rem;
 padding: .75rem;
 color: #edf1f3;
 background: #10161f;
 border: 1px solid #495763;
 border-radius: 8px;
 font: inherit;
 resize: vertical;
}

.collab-comment-input:focus { outline: 2px solid #a9dfcb; outline-offset: 2px; }
.waveform-track > .has-waveform-comments {
 position: relative;
 z-index: 1;
 pointer-events: none;
}

.waveform-comment-marker { cursor: pointer; pointer-events: visiblePainted; }
.waveform-comment-marker .waveform-comment-stem {
 fill: none;
 stroke: #ffd3aa;
 stroke-width: 1.25;
 opacity: .8;
 pointer-events: none;
}
.waveform-comment-marker circle {
 fill: #ffb67e;
 stroke: #202932;
 stroke-width: 1.5;
}
.waveform-comment-marker text {
 fill: #26170c;
 font: 750 10px system-ui, sans-serif;
 pointer-events: none;
}
.waveform-comment-marker .waveform-marker-avatar { opacity: 0; pointer-events: none; }
.waveform-comment-marker .has-avatar .waveform-marker-avatar { opacity: 1; }
.waveform-comment-marker .has-avatar .waveform-marker-initials { display: none; }
.waveform-comment-marker .waveform-marker-stack-bg { fill: #ffb67e; stroke: #202932; pointer-events: none; }
.waveform-comment-marker .waveform-marker-stack-count { font-size: 7px; }
.waveform-comment-marker:hover circle,
.waveform-comment-marker:focus-visible circle,
.waveform-comment-marker[aria-expanded="true"] circle { fill: #ffe1bd; stroke: #6c3e1a; }

.waveform-comment-preview {
 position: absolute;
 z-index: 2;
 top: 34px;
 left: clamp(min(9rem, 50%), var(--comment-x), max(calc(100% - 9rem), 50%));
 transform: translateX(-50%);
 display: grid;
 gap: .16rem;
 width: min(18rem, 100%);
 padding: .3rem .55rem;
 color: #f5f0eb;
 background: #211d1a;
 border: 1px solid #926846;
 border-radius: 6px;
 font-size: .8rem;
 line-height: 1.3;
 pointer-events: none;
}
.waveform-comment-preview-by { display: flex; align-items: center; gap: .35rem; min-width: 0; }
.waveform-comment-preview-by .collab-comment-avatar { width: 20px; height: 20px; font-size: 8px; }
.waveform-comment-preview strong { color: #ffca9f; }
.waveform-comment-preview strong,
.waveform-comment-preview > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.waveform-discussion {
 margin-top: .85rem;
 padding: .75rem;
 min-width: 0;
 background: #191f26;
 border: 1px solid #66513e;
 border-radius: 8px;
}
.waveform-discussion[hidden],
.waveform-discussion [hidden],
.waveform-comment-preview[hidden] { display: none !important; }
.waveform-discussion-heading {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: .5rem;
}
.waveform-discussion-heading h3 { margin: 0; font-size: .95rem; color: #ffcfaa; }
.waveform-discussion .collab-comments-list {
 margin-top: .6rem;
 max-height: min(240px, 40vh);
 overflow: auto;
}
.waveform-discussion .collab-comments-list:empty { margin-top: 0; }
.waveform-discussion .collab-comment { padding: .55rem .75rem; }
.waveform-discussion .collab-comment-form {
 grid-template-columns: minmax(0, 1fr) auto;
 align-items: end;
 gap: .45rem .65rem;
 margin-top: .65rem;
 padding-top: .65rem;
}
.waveform-discussion .collab-comment-context { grid-column: 1 / -1; }
.project-card .waveform-discussion .collab-comment-target,
.waveform-discussion .collab-comment-label { margin: 0; }
.waveform-discussion .collab-comment-input { height: 3rem; min-height: 3rem; }
.waveform-discussion > button { margin-top: .5rem; }
