/*
 * The token page's Comments tab (components/token/Comments.tsx) and the
 * chart's trader avatars tooltip (components/token/TradeChart.tsx). Built
 * from the design tokens of tokens.css, so both themes follow.
 */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* ---------- composer ---------- */
.cmt-compose{display:flex;flex-direction:column;gap:8px;padding:12px;margin:10px 0 6px;border:1px solid var(--line);
  border-radius:16px;background:var(--surface)}
.cmt-compose.reply{margin:10px 0 2px;padding:10px;border-radius:14px}
.cmt-compose textarea{width:100%;box-sizing:border-box;resize:none;min-height:44px;border:0;outline:0;background:transparent;
  color:var(--ink);font:inherit;font-size:14.5px;line-height:1.5;padding:2px 2px}
.cmt-compose.reply textarea{min-height:34px;font-size:14px}
.cmt-compose textarea::placeholder{color:var(--muted)}
.cmt-compose:focus-within{border-color:var(--accent)}
.cmt-cbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.cmt-attach{display:inline-grid;place-items:center;width:34px;height:34px;border-radius:10px;color:var(--muted);cursor:pointer;flex:none}
.cmt-attach:hover,.cmt-attach:focus-within{color:var(--accent);background:var(--surface-2)}
.cmt-attach input{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden}
.cmt-hint{flex:1 1 160px;min-width:0;font-size:12px;color:var(--muted)}
.cmt-hint.bad,.cmt-count.bad{color:var(--bad)}
.cmt-count{font-size:12px;color:var(--muted)}
.cmt-btn{flex:none;height:36px;padding:0 18px;border-radius:11px;background:var(--accent);color:var(--accent-ink);font-size:14px;font-weight:600}
.cmt-btn:hover:not(:disabled){filter:brightness(1.08)}
.cmt-btn:disabled{opacity:.5;cursor:not-allowed}
.cmt-cancel{margin:0}
.cmt-gate{flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px 16px;font-size:13.5px;color:var(--ink-2)}
.cmt-gate span{flex:1 1 260px}
.cmt-err{color:var(--bad);font-size:12.5px;margin:0}
.cmt-err.small{font-size:12px}
.cmt-picprev{position:relative;width:96px;height:96px;border-radius:12px;overflow:hidden;background:var(--surface-2)}
.cmt-picprev img{width:100%;height:100%;object-fit:cover;display:block}
.cmt-picprev .skl{display:block;width:100%;height:100%}
.cmt-picprev .txx{position:absolute;top:4px;right:4px;width:24px;height:24px;border-radius:50%;background:rgba(0,0,0,.55);color:#fff;
  display:grid;place-items:center;font-size:16px;line-height:1}

/* ---------- the new-comments pill ---------- */
.cmt-pillrow{position:sticky;top:12px;z-index:5;display:flex;justify-content:center;height:0;overflow:visible}
.cmt-pill{transform:translateY(4px);padding:7px 16px;border-radius:999px;background:var(--accent);color:var(--accent-ink);font-size:13px;
  font-weight:600;box-shadow:0 6px 24px var(--glow);animation:cmtpill .25s ease-out}
@keyframes cmtpill{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(4px)}}

/* ---------- the thread ---------- */
.cmt-list,.cmt-replies{list-style:none;margin:0;padding:0}
.cmt-list{overflow-anchor:auto}
.cmt{display:flex;gap:12px;padding:14px 4px;border-top:1px solid var(--line-soft);scroll-margin-top:90px}
.cmt-list > .cmt:first-child{border-top:none}
.cmt-replies{margin-top:6px}
.cmt-replies .cmt{padding:10px 0 4px;border-top:none}
.cmt-av{flex:none;line-height:0;border-radius:50%}
.cmt-main{flex:1;min-width:0}
.cmt-head{display:flex;align-items:center;flex-wrap:wrap;gap:4px 8px;font-size:13px;line-height:1.35}
.cmt-name{color:var(--ink);font-weight:600;text-decoration:none;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cmt-name:hover{color:var(--accent)}
.cmt-addr{color:var(--muted);font-size:11.5px}
.cmt-badge{font-size:11px;font-weight:600;padding:1px 7px;border-radius:999px;background:var(--surface-2);color:var(--ink-2);white-space:nowrap}
.cmt-badge.creator{background:var(--accent-dim);color:var(--accent)}
.cmt-badge.holder{color:var(--ink-2)}
.cmt-badge.kns{color:var(--muted);font-weight:500}
.cmt-badge.you{color:var(--muted);font-weight:500}
.cmt-time{margin-left:auto;display:inline-flex;gap:8px;color:var(--muted);font-size:12px;white-space:nowrap}
.cmt-no{font-size:11px;opacity:.8}
.cmt-body{margin-top:4px;font-size:14.5px;line-height:1.55;color:var(--ink);white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;outline:none}
.cmt-quote{display:inline;padding:0 2px;border-radius:4px;color:var(--accent);font-size:.92em;background:none;cursor:pointer}
.cmt-quote:hover{background:var(--accent-dim)}
.cmt-pic{display:block;margin-top:8px;padding:0;border:0;background:var(--surface-2);border-radius:12px;overflow:hidden;width:200px;max-width:100%;
  aspect-ratio:1;cursor:zoom-in}
.cmt-pic.big{width:420px;cursor:zoom-out}
.cmt-pic img{width:100%;height:100%;object-fit:cover;display:block}
.cmt-pic.none{display:inline-block;width:auto;aspect-ratio:auto;padding:6px 10px;font-size:12px;color:var(--muted);cursor:default}
.cmt-actions{display:flex;align-items:center;gap:4px;margin-top:6px;margin-left:-6px}
.cmt-actions button{display:inline-flex;align-items:center;gap:5px;min-height:30px;padding:0 8px;border-radius:9px;font-size:12.5px;color:var(--muted)}
.cmt-actions button:hover:not(:disabled){color:var(--ink);background:var(--surface-2)}
.cmt-like span{font-size:14px;line-height:1}
.cmt-like.on{color:var(--bad)}
.cmt-like:disabled{opacity:.7;cursor:default}
.cmt-status{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:6px;font-size:12.5px;color:var(--muted)}
.cmt-status .back{margin:0}
.cmt.signing,.cmt.sending{opacity:.72}
.cmt.failed .cmt-body{color:var(--ink-2)}
.cmt-more .back{margin:2px 0 0}
.cmt.in{animation:cmtin .9s ease-out}
.cmt.flash{animation:cmtflash 1.6s ease-out}
@keyframes cmtin{from{background:var(--accent-dim)}to{background:transparent}}
@keyframes cmtflash{0%,30%{background:var(--accent-dim)}100%{background:transparent}}
@media (prefers-reduced-motion: reduce){
  .cmt.in,.cmt.flash,.cmt-pill{animation:none}
}
@media (max-width: 560px){
  .cmt{gap:10px}
  .cmt-time{margin-left:0}
  .cmt-pic.big{width:100%}
  .cmt-hint{flex-basis:100%;order:3}
  .cmt-post{margin-left:auto}
}

/* ---------- chart trader avatars ---------- */
.lwc-avtip{position:absolute;z-index:3;transform:translate(-50%, calc(-100% - 14px));pointer-events:auto;min-width:150px;max-width:240px;
  padding:9px 11px;border-radius:12px;background:var(--surface-3);color:var(--ink);border:1px solid var(--line);font-size:12px;line-height:1.45;
  box-shadow:0 8px 28px rgba(0,0,0,.28)}
.lwc-avtip a{color:var(--ink);font-weight:600;text-decoration:none}
.lwc-avtip a:hover{color:var(--accent)}
.lwc-avtip .side.buy{color:var(--ok);font-weight:600}
.lwc-avtip .side.sell{color:var(--bad);font-weight:600}
.lwc-avtip .m{color:var(--muted)}
.chartctl .avbtn[aria-pressed="true"]{color:var(--accent);border-color:var(--accent)}
.lwc-avlist{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
