/* Essay header meta (date · view count) */
.essay-meta {
  color: #7a6e55;
  font-size: 14px;
  margin: 4px 0 0;
  display: inline-flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
}
.essay-meta .essay-dot   { color: #c9bda0; }
.essay-meta .essay-views { color: #8a7a55; font-variant-numeric: tabular-nums; }

/* Byline: author + translator credit, right under the cover image. */
.essay-byline {
  margin: 0 0 28px;
  color: #7a6e55;
  font-size: 14px;
  font-style: italic;
  letter-spacing: .01em;
}

/* Title that doubles as a footnote anchor (e.g. The Native Accent Unchanged -> #fn1). */
.title-ref-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed rgba(90, 74, 48, .35);
  padding-bottom: 2px;
  transition: border-color .15s ease, color .15s ease;
}
.title-ref-link:hover {
  color: #5a4a30;
  border-bottom-color: #c9a96e;
}

/* Essay listing card: date · views line */
.article_list .date .card-dot   { color: #c9bda0; margin: 0 4px; }
.article_list .date .card-views { color: #8a7a55; font-variant-numeric: tabular-nums; }

/* Comment widget — threaded, translate, OTP auth. */
#comments-root {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid #e5dfd0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: #2a2a2a;
}
#comments-root .comments-heading {
  font-size: 20px; font-weight: 600; margin: 0 0 16px; color: #1a1a1a;
}

/* status */
.comments-status { min-height: 0; }
.comments-status[data-kind="ok"]    { color: #2e7d32; }
.comments-status[data-kind="err"]   { color: #b71c1c; }
.comments-status[data-kind="info"]  { color: #6b5d3a; }
.comments-status:empty { display:none; }
.comments-status.show {
  display: block; background: #faf7f0; border: 1px solid #ead9b8;
  border-radius: 8px; padding: 10px 14px; margin: 10px 0; font-size: 14px;
}

/* auth */
.comments-auth { background: #fafafa; border: 1px solid #e5dfd0; border-radius: 10px;
                  padding: 16px 18px; margin-bottom: 20px; }
.comments-auth h4 { margin: 0 0 6px; font-size: 15px; font-weight: 600; }
.comments-auth p.muted { color: #777; font-size: 13px; margin: 0 0 12px; }
.comments-auth .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.comments-auth input[type="email"],
.comments-auth input[type="text"] {
  flex: 1 1 220px; min-width: 200px; padding: 9px 12px;
  border: 1px solid #d4c4a3; border-radius: 8px; font: inherit; background: #fff;
}
.comments-auth input:focus, .comments-composer textarea:focus, .reply-box textarea:focus {
  outline: none; border-color: #c9a96e; box-shadow: 0 0 0 3px rgba(201,169,110,.18);
}

button.link-btn,
.comments-auth button,
.comments-composer button,
.reply-box button {
  appearance: none; border: none; cursor: pointer; transition: background .15s ease;
  font: inherit;
}
.comments-auth button,
.comments-composer button,
.reply-box > .actions button:first-child {
  background: #5a4a30; color: #fff; padding: 9px 16px; border-radius: 8px; font-weight: 500;
}
.comments-auth button:hover,
.comments-composer button:hover,
.reply-box > .actions button:first-child:hover { background: #3e3320; }
button[disabled] { opacity: .55; cursor: not-allowed; }

.link-btn {
  background: transparent; color: #5a4a30;
  text-decoration: underline; padding: 0; font-weight: normal; font-size: 13px;
}
.link-btn:hover { color: #3e3320; }

/* composer */
.comments-composer {
  background: #fff; border: 1px solid #e5dfd0; border-radius: 10px;
  padding: 14px 16px; margin-bottom: 24px;
}
.comments-composer .me { font-size: 13px; color: #666; margin-bottom: 8px;
                          display: flex; justify-content: space-between; align-items: center; }
.comments-composer .me .name { color: #2a2a2a; font-weight: 500; }
.comments-composer textarea, .reply-box textarea {
  width: 100%; min-height: 90px; padding: 10px 12px;
  border: 1px solid #d4c4a3; border-radius: 8px; font: inherit; resize: vertical;
  background: #fff; box-sizing: border-box;
}
.comments-composer .actions, .reply-box .actions {
  display: flex; gap: 10px; align-items: center; margin-top: 8px;
  font-size: 12px; color: #888;
}
.comments-composer .actions { justify-content: space-between; }

/* list */
.comments-list { margin-top: 8px; }
.comments-list .empty { color: #999; font-style: italic; padding: 16px 0; }

.comments-list .item {
  padding: 14px 0;
  border-bottom: 1px solid #f0e9d8;
}
.comments-list .item:last-child { border-bottom: none; }
.comments-list .item.is-author {
  background: #fbf8f1;
  border-radius: 8px;
  padding: 12px 14px;
  border: 1px solid #ead9b8;
  margin-bottom: 8px;
}

/* replies group (indented under their parent) */
.comments-list .replies {
  margin-left: 22px;
  padding-left: 14px;
  border-left: 2px solid #ead9b8;
  margin-bottom: 6px;
}
.comments-list .replies .item { padding: 10px 0; }
.comments-list .replies .item.is-author { padding: 10px 14px; }

.comments-list .meta {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  font-size: 13px; margin-bottom: 6px;
}
.comments-list .meta .author { font-weight: 600; color: #1a1a1a; display: inline-flex; align-items: center; gap: 6px; }
.comments-list .meta .author .badge {
  background: #5a4a30; color: #fff; font-size: 11px; font-weight: 500;
  padding: 1px 7px; border-radius: 10px; text-transform: uppercase; letter-spacing: .04em;
}
.comments-list .meta .pin { font-size: 12px; }
.comments-list .meta .likes { color: #b14a4a; font-size: 12px; font-weight: 500; }
.comments-list .meta .liked {
  color: #5a4a30; font-size: 11px;
  background: #faf2e0; padding: 1px 7px; border-radius: 10px;
}

.comments-list .body {
  white-space: pre-wrap; word-break: break-word; line-height: 1.6; color: #2a2a2a;
}

.comments-list .actions-row {
  display: flex; gap: 8px; margin-top: 10px; align-items: center; flex-wrap: wrap;
}

/* Small pill buttons used in the comment action row (Translate, Reply). */
.pill-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: #f6f1e4; color: #5a4a30;
  border: 1px solid #e0d3b0; border-radius: 999px;
  padding: 4px 12px; font-size: 12px; font-weight: 500;
  font-family: inherit; line-height: 1.4;
  cursor: pointer; user-select: none;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .08s ease;
}
.pill-btn:hover  { background: #ead9b8; color: #3e3320; border-color: #c9a96e; }
.pill-btn:active { transform: scale(0.97); }
.pill-btn .icon  { opacity: .85; flex-shrink: 0; }
.pill-btn[disabled] {
  opacity: .55; cursor: progress;
}

/* Active state: the comment body is currently showing translated text. */
.pill-btn.is-active {
  background: #5a4a30; color: #faf7f0; border-color: #5a4a30;
}
.pill-btn.is-active .icon { opacity: 1; }
.pill-btn.is-active:hover { background: #3e3320; border-color: #3e3320; }

.translate-btn { /* shared base; specialize here if needed */ }
.reply-btn     { }

.reply-box {
  margin-top: 10px; padding: 10px 0 0;
}
