/* ── Comment item ── */
.comment-item {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 10px 16px;
  border-bottom: 1px solid var(--b);
}
.comment-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--a);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; color: #fff;
  flex-shrink: 0;
}
.comment-avatar img { width: 100%; height: 100%; object-fit: cover }
.comment-body { flex: 1; min-width: 0 }
.comment-meta { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-bottom: 3px }
.comment-username { font-size: .8rem; font-weight: 600; color: var(--ink); text-decoration: none }
.comment-time { font-size: .66rem; color: var(--i4) }
.comment-text { font-size: .82rem; color: var(--i2); line-height: 1.55; margin-bottom: 5px }
.comment-actions { display: flex; align-items: center; gap: 10px }
.comment-btn { font-size: .68rem; color: var(--i3); background: none; border: none; cursor: pointer; padding: 0; font-weight: 500 }
.comment-btn:hover { color: var(--a) }

/* ── Author badge ── */
.author-badge {
  font-size: .58rem;
  color: var(--a);
  background: var(--al);
  border: 1px solid var(--ab);
  padding: 0 5px;
  border-radius: 99px;
}

/* ── Reply item (indented) ── */
.reply-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 8px;
}
.reply-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--a);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: .65rem; color: #fff;
  flex-shrink: 0;
}
.reply-avatar img { width: 100%; height: 100%; object-fit: cover }
.reply-body { flex: 1; min-width: 0 }
.reply-meta { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-bottom: 2px }
.reply-username { font-size: .76rem; font-weight: 600; color: var(--ink); text-decoration: none }
.reply-time { font-size: .63rem; color: var(--i4) }
.reply-text { font-size: .78rem; color: var(--i2); line-height: 1.5; margin-bottom: 4px }
.reply-actions { display: flex; align-items: center; gap: 10px }
.reply-btn { font-size: .65rem; color: var(--i3); background: none; border: none; cursor: pointer; padding: 0; font-weight: 500 }
.reply-btn:hover { color: var(--a) }

/* ── View replies button ── */
.view-replies-btn {
  font-size: .68rem;
  color: var(--a);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 3px;
}
.view-replies-line {
  display: inline-block;
  width: 16px; height: 1px;
  background: var(--b);
  vertical-align: middle;
}

/* ── Replies container ── */
.replies-container { display: none; margin-left: 41px; margin-top: 8px }

/* ── Edit box ── */
.edit-box { display: none; margin-top: 6px }
.edit-box textarea {
  width: 100%;
  border: 1px solid var(--b);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: .78rem;
  color: var(--ink);
  resize: none;
  outline: none;
  background: var(--bs);
  font-family: inherit;
}
.edit-box-actions { display: flex; gap: 6px; margin-top: 4px }
.edit-save { padding: 2px 10px; background: var(--a); color: #fff; border: none; border-radius: 99px; font-size: .66rem; font-weight: 600; cursor: pointer }
.edit-cancel { padding: 2px 8px; background: none; color: var(--i3); border: 1px solid var(--b); border-radius: 99px; font-size: .66rem; cursor: pointer }

/* ── Comment input bar (fixed bottom) ── */
.comment-input-bar {
  position: fixed;
  bottom: 52px;
  left: 0;
  right: 0;
  background: var(--w);
  z-index: 100;
  border-top: 1px solid var(--b);
  padding-bottom: env(safe-area-inset-bottom);
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}
@media (min-width: 681px) {
  .comment-input-bar { position: sticky; bottom: 0; left: auto; right: auto }
}

/* ── Replying-to label ── */
.replying-to-label {
  display: none;
  font-size: .68rem;
  color: var(--i3);
  margin-bottom: 5px;
  align-items: center;
  gap: 6px;
}
.replying-to-cancel { background: none; border: none; cursor: pointer; color: var(--i4); font-size: .7rem; padding: 0 }

/* ── Input row ── */
.comment-input-row { display: flex; gap: 8px; align-items: center }
.comment-input-ava {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--a);
  flex-shrink: 0;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--fd); font-size: .72rem; color: #fff; font-style: italic;
}
.comment-input-ava img { width: 100%; height: 100%; object-fit: cover }
.comment-input-wrap {
  flex: 1;
  border: 1px solid var(--b);
  border-radius: 20px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bs);
}
.comment-input-wrap textarea {
  flex: 1;
  border: none;
  outline: none;
  font-size: .8rem;
  color: var(--ink);
  resize: none;
  background: transparent;
  font-family: inherit;
  line-height: 1.5;
}
.comment-send-btn {
  padding: 3px 10px;
  background: var(--a);
  color: #fff;
  border: none;
  border-radius: 99px;
  font-size: .7rem;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}
.comment-send-btn:hover { background: var(--ah) }

/* ── Bubble comment style (public_answer_detail) ── */
.bubble-comment { display: flex; gap: 9px; align-items: flex-start; padding: 10px 16px; border-bottom: 1px solid var(--b) }
.bubble-ava { width: 30px; height: 30px; border-radius: 50%; background: var(--a); overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: .76rem; color: #fff }
.bubble-body { flex: 1; min-width: 0 }
.bubble-box { background: var(--bs); border: 1px solid var(--b); border-radius: 4px 14px 14px 14px; padding: 8px 11px; display: block; width: 100% }
.bubble-meta { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin-bottom: 3px }
.bubble-user { font-size: .78rem; font-weight: 600; color: var(--ink); text-decoration: none }
.bubble-time { font-size: .65rem; color: var(--i4) }
.bubble-author { font-size: .58rem; color: var(--a); background: var(--al); border: 1px solid var(--ab); padding: 0 5px; border-radius: 99px }
.bubble-text { font-size: .8rem; color: var(--i2); line-height: 1.5 }
.bubble-actions { display: flex; gap: 9px; margin-top: 5px; padding-left: 2px }
.bubble-btn { font-size: .67rem; color: var(--i3); background: none; border: none; cursor: pointer; padding: 0; font-weight: 500; font-family: inherit }
.bubble-btn.gold { color: var(--a) }
.reply-line { display: inline-block; width: 14px; height: 1px; background: var(--b); vertical-align: middle; margin-right: 2px }
.reply-wrap { margin-top: 8px; margin-left: 8px; border-left: 2px solid var(--b); padding-left: 10px }
.reply-item { display: flex; gap: 7px; margin-bottom: 7px }
.reply-ava { width: 24px; height: 24px; border-radius: 50%; background: var(--a); overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: .6rem; color: #fff }
.reply-box { background: var(--w); border: 1px solid var(--b); border-radius: 4px 12px 12px 12px; padding: 6px 10px; display: block; width: 100% }
.reply-mention { color: var(--a); font-weight: 500 }
