.activity-comment-thread { border-bottom: 1px solid var(--line); }
.activity-comment-thread:last-child { border-bottom: 0; }
.activity-comment { position: relative; padding: 14px 0 8px 42px; }
.activity-comment::before { content: attr(data-initial); position: absolute; top: 14px; left: 0; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--muted); background: var(--paper-2); font: 12px/1 var(--sans); }
.activity-comment header { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; font: 12px/1.7 var(--sans); }
.activity-comment strong { color: var(--ink); font-weight: 700; overflow-wrap: anywhere; }
.activity-comment time { color: var(--muted); font-size: 10px; }
.activity-comment p { margin: 5px 0 0; font-size: 14px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.activity-comment.is-collapsed [data-comment-body] { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.activity-comment-actions { display: flex; align-items: center; gap: 12px; margin-top: 2px; }
.activity-comment-actions button { min-width: 32px; min-height: 32px; padding: 4px 0; border: 0; color: var(--muted); background: transparent; font: 12px/1.5 var(--sans); }
.activity-comment-target { color: var(--muted); font-family: var(--sans); font-size: 12px; }
.activity-comment-replies { margin: 0 0 14px 42px; padding: 0 10px; border-left: 2px solid var(--line-strong); border-radius: 0 8px 8px 0; background: var(--paper-2); }
.activity-comment--reply { padding: 10px 0 4px 32px; }
.activity-comment--reply[hidden] { display: none; }
.activity-comment--reply + .activity-comment--reply { border-top: 1px solid var(--line); }
.activity-comment--reply::before { top: 10px; width: 24px; height: 24px; color: var(--muted); background: var(--paper); font-size: 10px; }
.activity-comment--reply p { font-size: 13px; }
.activity-comment-form { display: grid; flex: 0 1 auto; gap: 8px; min-height: 0; max-height: 86%; margin: 0; padding: 10px 20px 16px; overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid var(--line); background: var(--paper); }
.activity-comment-form :is(input,textarea) { box-sizing: border-box; display: block; width: 100%; min-width: 0; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper-2); color: var(--text); font: 13px/1.5 var(--sans); }
.activity-comment-form :is(input,textarea)::placeholder { color: var(--muted); opacity: 1; font: inherit; }
.activity-comment-form input { height: 44px; }
.activity-comment-identity { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.4fr); gap: 10px; min-width: 0; margin: 0; padding: 0; border: 0; }
.activity-comment-identity legend { float: left; grid-column: 1 / -1; width: 100%; padding: 0; color: var(--muted); font: 12px/1.7 var(--sans); }
.activity-comment-identity label { display: grid; gap: 5px; min-width: 0; color: var(--muted); font: 12px/1.5 var(--sans); }
.activity-verification { min-width: 0; }
.activity-verification[hidden] { display: none; }
.activity-verification-content { width: 100%; min-height: 65px; }
.activity-verification > button { min-height: 36px; padding: 6px 0; border: 0; color: var(--ink); background: transparent; font: 12px/1.5 var(--sans); }
.activity-verification > button[hidden] { display: none; }
.activity-chat .activity-comment-thread { padding: 8px 0 14px; border: 0; }
.activity-chat .activity-comment { width: 100%; max-width: none; box-sizing: border-box; padding: 12px 0 0 46px; }
.activity-chat .activity-comment::before { top: 12px; bottom: auto; right: auto; width: 34px; height: 34px; background-color: var(--paper-2); color: var(--muted); }
.activity-chat .activity-comment header { justify-content: flex-start; gap: 6px; font: 13px/1.6 var(--sans); }
.activity-chat .activity-comment strong { color: var(--muted); font-weight: 400; }
.activity-chat .activity-comment p { margin: 3px 0 0; color: var(--text); font: var(--weight-body) 15px/1.7 var(--sans); }
.activity-chat .activity-comment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 4px; color: var(--muted); }
.activity-chat .activity-comment-meta time { font: 12px/1.6 var(--sans); }
.activity-chat .activity-comment-actions { margin: 0; }
.activity-chat .activity-comment-actions button { min-height: 32px; font-size: 12px; }
.activity-chat .activity-comment-replies { margin: 0 0 0 46px; padding: 0; border: 0; border-radius: 0; background: transparent; }
.activity-chat .activity-comment--reply { padding-left: 36px; }
.activity-chat .activity-comment--reply::before { width: 26px; height: 26px; }
.activity-chat .activity-comment--reply + .activity-comment--reply { border: 0; }
.activity-chat .activity-comment-target { font-size: inherit; }

@media (max-width:600px) {
  .activity-chat .activity-comment header { font-size: 13px; }
  .activity-chat .activity-comment-identity input { font-size: 15px; }
}

@supports (-webkit-touch-callout:none) {
  @media (pointer:coarse) {
    .activity-chat .activity-comment-identity input { font-size: 16px; }
  }
}
.activity-chat .activity-comment::before { content: ""; }
.activity-chat .activity-comment.has-avatar::before { display: none; }
.activity-comment-avatar { position: absolute; top: 12px; left: 0; width: 34px; height: 34px; border-radius: 50%; object-fit: cover; object-position: center; background: var(--paper-2); filter: none; image-rendering: auto; pointer-events: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: default; }
.activity-comment--reply .activity-comment-avatar { width: 26px; height: 26px; }
.activity-chat .guestbook-author-badge { display: inline-flex; align-items: center; padding: 1px 5px; border: 1px solid color-mix(in srgb,var(--link-blue) 25%,transparent); border-radius: 4px; color: var(--link-blue); background: color-mix(in srgb,var(--link-blue) 9%,var(--paper)); font: 12px/1.5 var(--sans); }
.guestbook-page .guestbook-scroll { overflow-anchor: none; scrollbar-gutter: stable; }
/* Desktop comment typography. */
@media (min-width:721px) {
  body[data-current="guestbook"] {
    --activity-type-body: 16px;
    --activity-type-control: 15px;
    --activity-type-meta: 13px;
  }
  body[data-current="guestbook"] .activity-chat .activity-comment header { font-size: var(--activity-type-control); }
  body[data-current="guestbook"] .activity-chat .activity-comment p { font-size: var(--activity-type-body); }
  body[data-current="guestbook"] .activity-chat :is(.activity-comment-meta time,.guestbook-author-badge,.activity-comment-identity legend) { font-size: var(--activity-type-meta); }
  body[data-current="guestbook"] .activity-chat .activity-comment-actions button { font-size: var(--activity-type-control); }
}
