/* Chat styles are scoped to the comment pane; homepage card rules stay separate. */
.messages{height:560px;background:#191919;border:0;border-radius:20px;padding:16px;gap:16px;scrollbar-color:#555 #191919;overflow-anchor:none;scroll-behavior:auto}
.messages .message{flex:none;max-width:100%;width:100%;padding:0;background:transparent;border-radius:0;align-self:stretch;gap:4px}
.messages .message-meta{display:flex;align-items:center;gap:8px;min-width:0;color:#989898;font-size:14px;line-height:1.4}
.message-avatar{width:28px;height:28px;flex:none;object-fit:cover;border-radius:50%}
.message-name{overflow-wrap:anywhere}
.message-edited{font-size:11px;font-weight:400}
.messages .message.own .message-meta{align-self:flex-end;text-align:right}
.message-line{display:flex;align-items:flex-end;gap:8px;max-width:90%;align-self:flex-start}
.message.own .message-line{flex-direction:row-reverse;align-self:flex-end}
.message-bubble{min-width:0;background:#292929;color:#f5f5f5;border-radius:23px;padding:10px 15px}
.comments{--own-bubble:#afe49f}
.comments:not([data-can-pin]) [data-pin-comment],
.discussion-preview-messages [data-pin-comment],
.comments .comment-pin[hidden]{display:none}
.comment-pin{display:flex;align-items:center;gap:8px;flex:none;min-width:0;padding:6px;border:1px solid #42513a;border-radius:12px;background:#222b22}
.comment-pin-link{display:grid;gap:2px;flex:1;min-width:0;text-align:left;padding:5px 8px;border:0;border-radius:8px;background:transparent;color:#f2f4ef;cursor:pointer}
.comment-pin-label,.comment-pin-preview{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.comment-pin-label{color:#c8ff92;font-size:12px;font-weight:700}
.comment-pin-preview{font-size:14px}
.comment-pin-link,[data-unpin],[data-pin-comment]{-webkit-tap-highlight-color:transparent}
.comment-pin-link:hover{background:#354432}
.comment-pin-link:active,[data-pin-comment]:active{transform:scale(.97)}
.comment-pin-link:focus-visible,[data-pin-comment]:focus-visible{outline:2px solid #c8ff3d;outline-offset:2px}
.comments .comment-new {
 display:inline-flex;
 align-items:center;
 justify-content:center;
 gap:6px;
 min-height:44px;
 padding:0 13px;
 border:1px solid #88bb72;
 border-radius:999px;
 background:#253727;
 color:#d6ffc7;
 font-family:inherit;
 font-size:13px;
 font-weight:700;
 line-height:1;
 white-space:nowrap;
 cursor:pointer;
 -webkit-tap-highlight-color:transparent;
}
.comments .comment-new[hidden] {display:none}
.comments .comment-new:hover {background:#304831}
.comments .comment-new:active {transform:scale(.97)}
.comments .comment-new:focus-visible {outline:2px solid #c8ff3d;outline-offset:2px}
.comments .comment-new:disabled {opacity:.65;cursor:wait}
.comments .comment-new span {color:#c8ff3d}
.comments .history-newer{display:flex;flex:none;align-self:stretch;align-items:center;justify-content:space-between;gap:8px;padding:0}
.comments .history-newer[hidden]{display:none}
.history-newer .comment-new{flex:none}
#messages .message.is-notification-target {
 border-radius:12px;
 outline:1px solid transparent;
 outline-offset:3px;
 animation:notification-comment-glow 3s ease-in-out both;
}
@keyframes notification-comment-glow {
 0%,30%,60%{outline-color:#c8ff3d70;box-shadow:0 0 4px #c8ff3d1a}
 15%,45%,75%{outline-color:#c8ff3dba;box-shadow:0 0 9px #c8ff3d38}
 100%{outline-color:transparent;box-shadow:none}
}
@media(prefers-reduced-motion:reduce){#messages .message.is-notification-target{animation:none;outline-color:#c8ff3d99}}
.messages{color-scheme:dark}
.message.own .message-bubble{background:var(--own-bubble);color:#101610;color-scheme:only light}
.messages .message-bubble p{margin:0;line-height:1.6;font-size:18px;white-space:pre-wrap;overflow-wrap:anywhere}
.message-time{display:flex;flex-direction:column;gap:2px;flex:none;white-space:nowrap;color:#808080;font-size:10px;line-height:1.4;padding-bottom:3px}
.message.own .message-time{text-align:right}
.message-date{font-size:10px}
.messages .message-tools{margin:0;gap:12px;align-self:flex-start;padding:0 14px}
.messages .message.own .message-tools{align-self:flex-end}
.messages .message-tools button{color:#a6a6a6;font-size:11px;border-radius:999px;padding:2px 0}
.messages .message-tools button:hover{color:#eee}
.messages .message-tools button:disabled{cursor:default;opacity:.45}.messages .message-tools button[data-sent=true]{opacity:.8}
.messages .message-bubble{position:relative}.messages .message-bubble.has-edit{padding-top:35px}
.messages .message-edit{position:absolute;top:4px;left:5px;display:inline-flex;align-items:center;justify-content:center;width:29px;height:29px;padding:0;border:0;border-radius:50%;background:#0000000d;color:#30452b;cursor:pointer;-webkit-tap-highlight-color:transparent}
.messages .message-edit:hover{background:#0000001c}.messages .message-edit:active{transform:scale(.92)}.messages .message-edit:focus-visible{outline:2px solid #365e28;outline-offset:1px}
.messages .reply-context{margin:0 0 7px;background:#ffffff0a;border-color:#999;color:#ddd;border-radius:9px;padding:7px 9px}
.messages .reply-context span{color:#bdbdbd}
.messages .message.own .reply-context{background:#0000000d;border-color:#416a38;color:#213b1c}
.messages .message.own .reply-context span{color:#35552c}
.messages .message.deleted{opacity:1}
.messages .message.deleted .message-bubble p{color:#aaa}
.messages .message.own .message-bubble p,.messages .message.own.deleted .message-bubble p{color:#101610}
#commentForm>button{background:var(--own-bubble);color:#101610;color-scheme:only light}
#commentForm textarea{flex:1;min-width:0;box-sizing:border-box;height:46px;resize:none;overflow-y:auto;border:1px solid #36434a;border-radius:999px;background:#182027;color:#fff;padding:11px 15px;font-family:inherit;font-size:16px;line-height:22px}
#commentForm{position:relative}
.comment-mention-menu{position:absolute;z-index:5;inset:auto 0 calc(100% + 6px);max-height:min(220px,calc(var(--discussion-height,100dvh) * .42));overflow:auto;overscroll-behavior:contain;box-sizing:border-box;padding:6px;border:1px solid #425249;border-radius:14px;background:#182027;color:#edf0ea;box-shadow:0 8px 24px #0008}
.comment-mention-menu p{margin:2px 6px 6px;color:#bbc6c5;font-size:12px}
.comment-mention-menu button{display:grid;grid-template-columns:minmax(0,1fr);gap:3px;width:100%;min-height:44px;padding:6px 9px;border:0;border-radius:9px;background:transparent;color:#edf0ea;text-align:left;overflow-wrap:anywhere;cursor:pointer}
.comment-mention-menu button small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#bbc6c5}
.comment-mention-menu button:hover,.comment-mention-menu button[aria-selected=true]{background:#304238}
.comment-mention-menu button{-webkit-tap-highlight-color:transparent}
.comment-mention-menu button:focus-visible{outline:2px solid #c8ff3d;outline-offset:2px}
.comment-mention-menu button:active{background:#34483e}
.messages .comment-mention{color:#c8ff3d}
.messages .own .comment-mention{color:#28481d}
@media(max-width:850px){.messages{height:480px;padding:14px 12px;border-radius:18px}.message-line{max-width:96%;gap:6px}.message-bubble{padding:9px 13px}.message-time{font-size:10px}}
