/* Comments: bottom sheet on phones, side panel on desktop (the feed stays usable beside it). */
.comment-action .action-label{min-width:2ch;text-align:center}
.comment-sheet{position:fixed;inset:0;z-index:30;pointer-events:none}
.comment-sheet[hidden]{display:none}
.comment-backdrop{position:absolute;inset:0;background:#0008;pointer-events:auto;animation:comment-fade .18s ease-out}
.comment-panel{position:absolute;left:0;right:0;bottom:0;height:min(72dvh,640px);display:flex;flex-direction:column;background:#141418;color:#f2f2f5;border-radius:16px 16px 0 0;box-shadow:0 -12px 40px #0009;pointer-events:auto;padding-bottom:env(safe-area-inset-bottom);animation:comment-up .22s cubic-bezier(.2,.8,.2,1)}
.comment-head{display:flex;align-items:center;gap:10px;padding:14px 14px 10px 18px;border-bottom:1px solid #26262d}
.comment-title{flex:1;margin:0;font-size:14px;font-weight:700;letter-spacing:-.2px}
.comment-sort{display:flex;gap:14px;align-items:center}
.comment-sort-btn{background:none;border:0;border-radius:0;padding:6px 0 4px;font-size:12px;font-weight:650;color:#8e8e99;border-bottom:2px solid transparent}
.comment-sort-btn.active{color:#fff;border-bottom-color:#fff}
.comment-sort-btn:focus-visible{outline:2px solid #fff;outline-offset:2px}
.comment-close{width:36px;height:36px;display:grid;place-items:center;background:none;border:0;border-radius:0;padding:0;font-size:26px;font-weight:300;line-height:1;color:#fff}
.comment-close:hover{opacity:.75}
.comment-close:focus-visible{outline:2px solid #fff;outline-offset:2px}
.comment-scroll{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:6px 0 10px}
.comment-list{display:flex;flex-direction:column}
.comment{display:grid;grid-template-columns:34px 1fr auto;gap:10px;padding:10px 14px 6px 16px;align-items:start}
.comment-reply{grid-template-columns:26px 1fr auto;padding:8px 0 4px}
.comment-avatar{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;font-size:14px;font-weight:750;background:#3a3a44;color:#fff}
.comment-reply .comment-avatar{width:26px;height:26px;font-size:11px}
.comment-main{min-width:0}
.comment-meta{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px;font-size:11.5px;color:#9a9aa5}
.comment-author{color:#d8d8de;font-weight:650}
.comment-handle{color:#7d7d88}
.comment-edited{font-style:italic}
.comment-body{margin:3px 0 4px;font-size:13.5px;line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere;overflow:hidden;color:#f4f4f6}
.comment-tag{color:#bdff63;font-weight:600}
.comment-mention{color:#8fc7ff;font-weight:600}
.comment-pending{margin:0 0 4px;font-size:11px;color:#ffcf66}
.comment.is-pending>.comment-main>.comment-body{opacity:.7}
.comment-actions{display:flex;gap:14px;align-items:center}
.comment-reply-btn,.comment-menu-btn,.comment-replies-more,.comment-more,.comment-retry{background:none;padding:4px 0;font-size:11.5px;font-weight:650;color:#9a9aa5}
.comment-menu-btn{font-size:16px;line-height:1;padding:0 4px;letter-spacing:1px}
.comment-menu{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0}
.comment-menu[hidden]{display:none}
.comment-menu-label{width:100%;font-size:11px;color:#9a9aa5}
.comment-menu-item{background:#22222a;border-radius:8px;padding:7px 11px;font-size:12px}
.comment-menu-item.danger{color:#ff6b81}
.comment-like{background:none;display:flex;flex-direction:column;align-items:center;gap:1px;min-width:32px;color:#9a9aa5;font-size:10.5px}
.comment-like svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2}
.comment-like.liked{color:#fe2c55}
.comment-like.liked svg{fill:currentColor;stroke:none}
.comment-replies{display:flex;flex-direction:column}
.comment-replies-more::before{content:'';display:inline-block;width:22px;height:1px;background:#4a4a54;vertical-align:middle;margin-right:8px}
.comment-more{display:block;margin:6px auto;padding:8px 14px}
.comment-empty,.comment-loading,.comment-error{display:flex;flex-direction:column;align-items:center;gap:6px;padding:48px 24px;text-align:center;color:#9a9aa5;font-size:13px}
.comment-empty strong{color:#eee;font-size:15px}
.comment-empty[hidden]{display:none}
.comment-push{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 12px 8px;padding:10px 12px;background:#1d2414;border:1px solid #3a4a22;border-radius:12px;font-size:12px}
.comment-push[hidden]{display:none}
.comment-push span{flex:1 1 180px}
.comment-push-yes{background:#bdff63;color:#17210b;border-radius:8px;padding:7px 12px;font-weight:700;font-size:12px}
.comment-push-no{background:none;color:#aaa;font-size:12px}
.comment-note{margin:0;padding:14px 18px;border-top:1px solid #26262d;font-size:12px;color:#9a9aa5;text-align:center}
.comment-note[hidden],.comment-composer[hidden]{display:none}
.comment-composer{border-top:1px solid #26262d;padding:8px 12px 10px}
.comment-context{display:flex;justify-content:space-between;align-items:center;font-size:11.5px;color:#9a9aa5;padding:0 4px 6px}
.comment-context[hidden]{display:none}
.comment-context-cancel{background:none;color:#ddd;font-size:11.5px;font-weight:650}
.comment-input-row{display:flex;gap:8px;align-items:flex-end}
.comment-input{flex:1;resize:none;max-height:110px;min-height:38px;border:0;border-radius:19px;background:#22222a;color:#fff;padding:10px 14px;font:inherit;font-size:13.5px;line-height:1.35;outline:none}
.comment-input:focus-visible{box-shadow:0 0 0 2px #bdff63}
.comment-send{background:#bdff63;color:#17210b;border-radius:19px;height:38px;padding:0 16px;font-weight:700;font-size:13px}
.comment-send:disabled{opacity:.5}
.comment-counter{display:block;text-align:right;font-size:10.5px;color:#8a8a95;min-height:0;padding:2px 6px 0}
.comment-counter:empty{display:none}
.comment-counter.over{color:#ff6b81}
@keyframes comment-up{from{transform:translateY(100%)}to{transform:none}}
@keyframes comment-fade{from{opacity:0}}
@media(min-width:900px){
  .comment-backdrop{display:none}
  .comment-panel{left:auto;top:0;bottom:0;right:0;height:auto;width:min(400px,calc((100vw - var(--feed-width, 56.25dvh))/2));border-radius:0;border-left:1px solid #25252b;box-shadow:-12px 0 40px #0007;animation:comment-left .2s ease-out}
  body.comments-open .feed-nav{visibility:hidden}
}
@keyframes comment-left{from{transform:translateX(40px);opacity:0}}
@media(prefers-reduced-motion:reduce){.comment-panel,.comment-backdrop{animation:none}}

/* Usable hit areas and flexible composer sizing on 320px phones. */
.comment-close,.comment-sort-btn,.comment-like,.comment-reply-btn,.comment-menu-btn,.comment-replies-more,.comment-more,.comment-retry,.comment-menu-item,.comment-push-yes,.comment-push-no,.comment-context-cancel,.comment-send{min-width:44px;min-height:44px}
.comment-input{min-width:0;min-height:44px;font-size:16px}
.comment-scroll{min-height:0}
.comment-head{gap:6px;padding-left:12px;padding-right:8px}
.comment-sort{gap:8px}
.comment-handle{color:#a4a4b0}
.comment-panel{padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}
@media(min-width:900px){.comment-panel{width:clamp(320px,calc((100vw - var(--feed-width, 56.25dvh))/2),400px)}}
