/* cmt.css —— 评论区独立皮肤
   只管结构件（列表 / 头像 / 署名行 / 气泡 / 加载更多 / 提示），不改排版规则：
   评论正文与文章正文共用 pubic.css 的 .md 块与元素级规则（pre/code/table/img）。
   颜色一律取 theme.css 变量，暗色自动跟随；不新造尺度变量。
   禁止给 .cmt / .cmt-body 加 overflow:hidden、max-height、固定高度。 */

.cmt-area{
  margin-top:1.4rem;
  /* 评论区整体比正文小一档：根字号定在这里，内部一律用 em，改一处全局跟着缩 */
  font-size:.92em;
  border-radius:var(--radius-lg);
  padding: 3vw;
  background:var(--paper);
  border:1px solid var(--line);
}

/* 总数 */
.cmt-total{
  display:flex;align-items:center;gap:.5em;
  margin:0 0 1rem;padding-bottom:.7rem;
  font-size:.82em;font-weight:600;color:var(--text-soft);
  border-bottom:1px solid var(--line-soft);
}

/* 列表：条目靠分隔线分块，不做卡片 */
.cmt-list{display:flex;flex-direction:column}

/* 条目：靠上分隔线分块，不做卡片 */
.cmt{
  padding:.75rem 0;
  border-top:1px solid var(--line-soft);
}
.cmt-list>.cmt:first-child{border-top:0;padding-top:.2rem}
.cmt-bulletin .cmt-main{grid-template-columns:minmax(0,1fr)}

.cmt-avatar{
  grid-row:1 / span 2;align-self:start;
  width:36px;height:36px;
  border-radius:var(--radius);object-fit:cover;
  background:var(--brand-soft);
  box-shadow:0 0 0 1px var(--line-soft);
}
/* 默认头像也失败时的首字母兜底 / 无作者时的占位 */
.cmt-avatar-text,
.cmt-avatar-none{
  display:inline-flex;align-items:center;justify-content:center;
  font-size:.82rem;font-weight:600;line-height:1;color:var(--brand);
}
.cmt-avatar-none{box-shadow:none;background:transparent}

/* 主体：头像占第一列并跨两行，署名行与气泡在第二列 */
.cmt-main{
  min-width:0;
  display:grid;grid-template-columns:36px minmax(0,1fr);
  gap:.35em .75em;align-items:start;
}

/* 署名行：昵称（可点）+ 时间 */
.cmt-meta{display:flex;align-items:baseline;gap:.6em;flex-wrap:wrap}
.cmt-name{
  display:inline-block;max-width:100%;
  font-size:.9em;font-weight:600;line-height:1.4;color:var(--text);
  word-break:break-all;text-decoration:none;
  transition:color .22s var(--ease);
}
a.cmt-name:hover{color:var(--brand);text-decoration:underline;text-underline-offset:.2em}
.cmt-time{font-size:.75em;color:var(--text-mute);white-space:nowrap}

/* 正文气泡：外形全交给共用皮肤 .md-card（见 pubic.css），这里只叠评论的紧口径。
   .md 的段距/缩进是照文章正文的松口径定的，评论里直接沿用会显得散，所以这里收紧一档。 */
.cmt-body{
  font-size:.95em;line-height:1.6;color:var(--text);
}
.cmt-body p{margin-bottom:.4em}
.cmt-body ul,.cmt-body ol{margin:.3em 0 .5em 1.35em}
.cmt-body li{margin-bottom:.15em}
.cmt-body div,.cmt-body center{margin-bottom:.4em}
.cmt-body h1,.cmt-body h2,.cmt-body h3,
.cmt-body h4,.cmt-body h5,.cmt-body h6{margin:.7em 0 .35em;line-height:1.4}
.cmt-body blockquote{margin:.4em 0;padding-left:.7em;line-height:1.6}
.cmt-body table{margin:.4em 0}
.cmt-body pre{margin:.4em 0}
.cmt-body hr{margin:.7em 0}

/* 提示 / 错误态 / 加载更多 */
.cmt-empty{margin:.8rem 0 0;font-size:.85em;color:var(--text-mute);text-align:center}
.cmt-notice{
  margin:0 0 .9rem;padding:.75rem .9rem;
  border-radius:var(--radius);border:1px solid var(--line);
  background:var(--surface-alt);
  font-size:.85em;line-height:1.7;color:var(--text-soft);
}
.cmt-notice a{margin-left:.4em;color:var(--brand);font-weight:600}
.cmt-more{
  display:block;width:100%;margin:1rem 0 0;
  padding:.6em 1em;font-size:.85em;
}

.cmt-cta{display:flex;justify-content:center;margin:1.4rem 0 0}

@media (max-width:520px){
  .cmt-area{font-size:.9em}
  .cmt{padding:.7rem 0}
  .cmt-main{grid-template-columns:32px minmax(0,1fr);gap:.3em .6em}
  .cmt-avatar{width:32px;height:32px}
  .cmt-total{font-size:.82em}
}
