#comments { margin-top: 72px; padding-top: 32px; border-top: 1px solid var(--line); font-size: 14px; }
.comments-heading { display: flex; align-items: center; gap: 12px; }
.comments-heading h2 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
#comment-count { padding: 2px 9px; border-radius: 20px; background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.comments-intro { margin: 8px 0 24px; color: var(--muted); }
.comment-composer { padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--ink) 2%, var(--paper)); }
#comment-auth { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin: 0; }
.comment-identity { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.comment-avatar { position: relative; display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; overflow: hidden; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); color: var(--accent); font-size: 14px; font-weight: 600; line-height: 1; }
.comment-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.comment-user-info { display: flex; flex-direction: column; min-width: 0; line-height: 1.6; overflow-wrap: anywhere; }
.comment-user-info strong { font-size: 13px; font-weight: 600; }
.comment-user-info small, .comment-login-hint { color: var(--muted); font-size: 12px; }
.comment-login-hint { margin: 0; }
#comments .comment-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 7px 14px; border: 1px solid var(--accent); border-radius: 8px; font: inherit; font-size: 13px; line-height: 1.5; font-weight: 500; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
#comments .comment-button-quiet { background: transparent; border-color: var(--line); color: var(--muted); }
#comments .comment-button-quiet:hover:not(:disabled) { color: var(--ink); border-color: var(--muted); background: color-mix(in srgb, var(--ink) 5%, transparent); }
#comments .comment-button:focus-visible, #comment-body:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
#comments .comment-button:disabled { opacity: .55; cursor: wait; }
.comment-logout svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
#comment-form { margin-top: 20px; }
#comment-form label { font-size: 13px; font-weight: 500; }
#comment-body { min-height: 132px; margin: 0; padding: 14px 16px; border-radius: 8px; background: var(--paper); font-size: 14px; line-height: 1.8; }
#comment-body::placeholder { color: var(--muted); opacity: .8; }
.comment-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; }
.comment-writing-help { display: flex; flex-direction: column; gap: 2px; color: var(--muted); font-size: 11px; line-height: 1.7; }
#comment-length { font-variant-numeric: tabular-nums; }
#comment-length[data-over-limit="true"] { color: var(--ink); font-weight: 700; }
#comments .comment-submit, #comments .comment-login { background: var(--accent); color: var(--paper); flex-shrink: 0; }
#comments .comment-submit:hover:not(:disabled), #comments .comment-login:hover { opacity: .85; }
#comment-status { margin: 16px 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
#comment-status:empty { display: none; }
#comment-empty { padding: 28px 12px; margin: 16px 0 0; text-align: center; color: var(--muted); font-size: 13px; }
#comment-list { list-style: none; padding: 0; margin: 8px 0 0; }
#comment-list > li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.comment-content { min-width: 0; }
.comment-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; min-height: 36px; font-size: 13px; }
.comment-meta strong { font-weight: 600; overflow-wrap: anywhere; }
.comment-meta time { font-size: 11px; letter-spacing: 0; }
#comments .comment-delete { margin-left: auto; min-height: 32px; padding: 4px 9px; border-color: transparent; font-size: 12px; }
.comment-body { margin: 10px 0 0; color: var(--ink); font-size: 14px; line-height: 1.85; overflow-wrap: anywhere; white-space: normal; }
.comment-body-plain { white-space: pre-wrap; }
.comment-body > :first-child { margin-top: 0; }
.comment-body > :last-child { margin-bottom: 0; }
.comment-body :is(p, ul, ol, blockquote, pre, table) { margin: 12px 0; }
.comment-body :is(h1, h2, h3, h4, h5, h6) { margin: 20px 0 10px; font-family: var(--font-body); font-size: 16px; font-weight: 600; line-height: 1.5; }
.comment-body :is(ul, ol) { padding-left: 22px; }
.comment-body li { padding: 0; border: 0; }
.comment-body li + li { margin-top: 4px; }
.comment-body li > p { margin: 4px 0; }
.comment-body blockquote { padding-left: 14px; border-left: 2px solid var(--line); color: var(--muted); }
.comment-body code { padding: 2px 5px; border-radius: 4px; background: color-mix(in srgb, var(--ink) 6%, transparent); font-size: .88em; }
.comment-body pre { max-width: 100%; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: color-mix(in srgb, var(--ink) 3%, transparent); font-size: 13px; line-height: 1.6; white-space: pre; }
.comment-body pre code { padding: 0; background: transparent; font-size: inherit; }
.comment-body table { max-width: 100%; font-size: 13px; }
.comment-body :is(th, td) { padding: 6px 12px; }
.comment-body img { display: block; max-width: 100%; max-height: 360px; height: auto; border-radius: 8px; }
.comment-body hr { margin: 20px 0; border: 0; border-top: 1px solid var(--line); }
#comment-more { display: flex; margin: 24px auto 0; }
@media (max-width: 500px) {
  .comment-composer { padding: 16px; }
  .comment-form-footer { align-items: flex-end; gap: 12px; }
  #comment-list > li { grid-template-columns: 28px minmax(0, 1fr); gap: 10px; }
  #comment-list .comment-avatar { width: 28px; height: 28px; font-size: 12px; }
  .comment-meta { min-height: 28px; }
  .comment-meta time { order: 1; flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { #comments .comment-button { transition: none; } }
