/* comments.css — STS2娘化MOD站 评论区（B站楼层式） */
/* 复用主站 CSS 变量；细边框、柔和阴影、无 emoji */

.cm-root {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(74,68,88,.08);
  font-family: var(--ft);
  color: var(--tp);
  overflow: hidden;
}
.cm-root * { box-sizing: border-box; }
.cm-root img { max-width: 100%; height: auto; }

/* ===== 头部 ===== */
.cm-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 18px;
}
.cm-title {
  font-size: 1rem; font-weight: 600; color: var(--tp);
  display: flex; align-items: baseline; gap: 6px; letter-spacing: .02em;
}
.cm-count { font-size: .78rem; color: var(--tm); font-weight: 500; }
.cm-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cm-tabs {
  display: inline-flex; background: rgba(232,155,155,.06);
  border-radius: 999px; padding: 3px; gap: 2px;
}
.cm-tab {
  font-family: var(--ft); font-size: .78rem; font-weight: 500;
  padding: 4px 12px; background: transparent; border: none;
  border-radius: 999px; color: var(--ts); cursor: pointer;
  transition: all .2s ease;
}
.cm-tab:hover { color: var(--tp); }
.cm-tab.active {
  background: #fff; color: var(--tp);
  box-shadow: 0 1px 3px rgba(74,68,88,.08);
}
.cm-user { display: inline-flex; align-items: center; }
.cm-user-inner {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 4px 10px 4px 4px; border-radius: 999px;
  transition: background .2s;
}
.cm-user-inner:hover { background: rgba(232,155,155,.08); }
.cm-nick {
  font-size: .82rem; color: var(--tp); max-width: 90px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cm-avatar {
  width: 26px; height: 26px; border-radius: 50%; object-fit: cover;
}
.cm-avatar.def {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--sl), var(--sm));
  color: #fff; font-size: .78rem; font-weight: 600;
}

/* ===== 按钮 ===== */
.cm-btn {
  font-family: var(--ft); font-size: .85rem; padding: 7px 16px;
  background: #fff; border: 1px solid rgba(74,68,88,.1);
  border-radius: 999px; color: var(--tp); cursor: pointer;
  font-weight: 500; transition: all .2s ease;
  box-shadow: 0 1px 2px rgba(74,68,88,.04);
}
.cm-btn:hover { border-color: rgba(232,155,155,.3); background: rgba(232,155,155,.04); }
.cm-btn:active { transform: scale(.98); }
.cm-btn.sm { padding: 4px 12px; font-size: .78rem; }
.cm-btn.primary {
  background: linear-gradient(135deg, var(--sm), #d97f7f);
  color: #fff; border-color: transparent;
}
.cm-btn.primary:hover {
  background: linear-gradient(135deg, #d97f7f, var(--sm));
  box-shadow: 0 2px 8px rgba(232,155,155,.3);
}
.cm-btn.danger { background: #fff; color: #b14b4b; border-color: rgba(177,75,75,.2); }
.cm-btn.danger:hover { background: rgba(177,75,75,.06); }
.cm-btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ===== 管理员工具条 ===== */
.cm-admin-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; margin: 0 0 14px;
  background: linear-gradient(135deg, #faf3e8 0%, #fdf6ea 100%);
  border-radius: 8px; font-size: .82rem; color: #8a6b3d;
  border: 1px solid rgba(244,185,96,.15);
}
.cm-admin-label { font-weight: 500; }
.cm-admin-bar .pending-btn { color: #8a6b3d; border-color: rgba(244,185,96,.3); }
.cm-admin-bar .pending-btn:hover { background: rgba(244,185,96,.12); }
.cm-pending-count { font-weight: 700; color: #b35e1a; }
html.dark .cm-admin-bar {
  background: linear-gradient(135deg, #2e2517 0%, #1e1b25 100%);
  color: #e8c060; border-color: rgba(244,185,96,.1);
}
html.dark .cm-admin-bar .pending-btn { color: #e8c060; border-color: rgba(244,185,96,.2); }
html.dark .cm-pending-count { color: #f4b960; }

/* ===== 登录提示 ===== */
.cm-login-hint {
  text-align: center; padding: 22px 16px;
  background: rgba(232,155,155,.04); border-radius: 8px;
  color: var(--ts); font-size: .85rem;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  flex-wrap: wrap;
}

/* ===== 评论列表（楼层式） ===== */
.cm-list { display: flex; flex-direction: column; gap: 0; }
.cm-item {
  padding: 16px 0;
  border-bottom: 1px solid rgba(74,68,88,.06);
}
.cm-item:last-child { border-bottom: none; }
.cm-item.deleted { opacity: .5; }
.cm-item.pending { background: rgba(251,232,195,.06); border-radius: 8px; padding: 16px 12px; }
.cm-item-row { display: flex; gap: 10px; align-items: flex-start; }
.cm-item-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
}
.cm-item-avatar.def {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--sl), var(--sm));
  color: #fff; font-size: .85rem; font-weight: 600;
}
.cm-item-main { flex: 1; min-width: 0; }
.cm-item-meta {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 4px; flex-wrap: wrap;
}
.cm-item-nick { font-size: .85rem; font-weight: 600; color: var(--tp); }
.cm-admin-badge {
  font-size: .62rem; font-weight: 500;
  padding: 1px 5px; border-radius: 3px;
  background: rgba(232,155,155,.15); color: #c97a7a;
}
.cm-pending-badge {
  font-size: .62rem; font-weight: 500;
  padding: 1px 5px; border-radius: 3px;
  background: rgba(244,185,96,.2); color: #b35e1a;
}
.cm-item-time { font-size: .72rem; color: var(--tm); margin-left: auto; }
.cm-item-content {
  font-size: .88rem; line-height: 1.6;
  color: var(--tp); white-space: pre-wrap; word-break: break-word;
}
.cm-item-content.deleted { color: var(--tm); font-style: italic; }
.cm-item-attachments {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px;
}
.cm-att {
  display: block; width: 120px; height: 120px;
  border-radius: 6px; overflow: hidden;
  border: 1px solid rgba(74,68,88,.06); transition: all .2s;
  flex-shrink: 0;
}
.cm-att img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cm-att:hover { transform: scale(1.03); box-shadow: 0 4px 12px rgba(74,68,88,.1); }
.cm-att.file {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; font-size: .75rem;
  background: rgba(232,155,155,.06); color: var(--ts);
  max-width: none; max-height: none;
}
.cm-att.file:hover { background: rgba(232,155,155,.12); }
.cm-item-actions {
  display: flex; gap: 2px; margin-top: 6px; font-size: .78rem;
}

/* ===== 点赞按钮（B站风格 SVG 图标） ===== */
.cm-action {
  font-family: var(--ft);
  background: none; border: none; padding: 3px 8px;
  color: var(--tm); cursor: pointer; border-radius: 4px;
  font-size: .76rem; transition: all .15s;
  display: inline-flex; align-items: center; gap: 4px;
}
.cm-action:hover { background: rgba(232,155,155,.08); color: var(--tp); }
.cm-like { gap: 5px; }
.cm-like-icon { flex-shrink: 0; transition: all .15s; }
.cm-like .cm-like-count { font-size: .74rem; }
.cm-like.liked { color: var(--sm); }
.cm-like.liked .cm-like-icon path { fill: currentColor; stroke: none; }
.cm-action.cm-mod-approve { color: #4a8a5a; }
.cm-action.cm-mod-reject { color: #b14b4b; }

/* ===== 回复区域（B站楼层式） ===== */
.cm-replies {
  margin-left: 46px; margin-top: 8px;
  padding-left: 12px;
  border-left: 2px solid rgba(232,155,155,.1);
  display: flex; flex-direction: column; gap: 8px;
}
.cm-reply {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 6px 0; flex-wrap: wrap;
}
.cm-reply-avatar {
  width: 24px; height: 24px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
}
.cm-reply-avatar.def {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--sl), var(--sm));
  color: #fff; font-size: .68rem; font-weight: 600;
}
.cm-reply-main { flex: 1; min-width: 0; min-width: 200px; }
.cm-reply-meta {
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
  margin-bottom: 2px;
}
.cm-reply-nick {
  font-size: .8rem; font-weight: 500; color: var(--tp);
}
.cm-reply-at {
  font-size: .74rem; color: var(--tm);
}
.cm-reply-at b { color: var(--sm); font-weight: 500; }
.cm-reply-content {
  font-size: .84rem; line-height: 1.5; color: var(--tp);
  white-space: pre-wrap; word-break: break-word;
}
.cm-reply-content.deleted { color: var(--tm); font-style: italic; }
.cm-reply-actions {
  display: flex; gap: 2px; margin-top: 4px; font-size: .74rem;
}
.cm-reply-actions .cm-action { font-size: .72rem; padding: 2px 6px; }
.cm-reply-actions .cm-like .cm-like-count { font-size: .7rem; }

/* 展开/收起回复 */
.cm-reply-toggle {
  font-family: var(--ft); font-size: .76rem;
  background: none; border: none; cursor: pointer;
  color: var(--sm); padding: 4px 0;
  transition: all .15s; align-self: flex-start;
}
.cm-reply-toggle:hover { color: #d97f7f; text-decoration: underline; }
.cm-replies-more { display: none; flex-direction: column; gap: 8px; }
.cm-item > .cm-compose { margin: 8px 0 0; }

/* ===== 发表框 ===== */
.cm-compose {
  background: rgba(255,253,251,.8); border-radius: 8px;
  padding: 10px 12px; margin: 14px 0;
}
.cm-compose.in-item { margin: 6px 0 2px; }
.cm-compose-textarea {
  width: 100%; min-height: 60px; max-height: 240px;
  font-family: var(--ft); font-size: .88rem;
  padding: 8px 10px; background: transparent;
  border: 1px solid transparent; border-radius: 6px;
  resize: vertical; color: var(--tp); outline: none;
  transition: all .2s;
}
.cm-compose-textarea:focus { background: #fff; border-color: rgba(232,155,155,.2); }
.cm-compose-textarea::placeholder { color: var(--tm); }
.cm-compose-attachments {
  display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 6px;
}
.cm-compose-actions {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-top: 4px;
}
.cm-compose-left {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .76rem; color: var(--ts);
}
.cm-file-input { display: none; }
.cm-file-btn {
  font-size: .76rem; padding: 2px 8px;
  color: var(--ts); cursor: pointer;
  border-radius: 4px; transition: background .15s;
  display: inline-flex; align-items: center;
}
.cm-file-btn:hover { background: rgba(232,155,155,.08); }
.cm-cooldown { font-size: .72rem; color: var(--tm); }
.cm-att-thumb {
  width: 50px; height: 50px; border-radius: 6px;
  object-fit: cover; border: 1px solid rgba(74,68,88,.06);
}

/* SVG 图标 */
.cm-icon-paperclip, .cm-icon-doc {
  display: inline-block; width: 14px; height: 14px;
  vertical-align: -2px; margin-right: 3px;
  background-repeat: no-repeat; background-position: center;
  background-size: contain; opacity: .7;
}
.cm-icon-paperclip {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a4458' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48'/%3E%3C/svg%3E");
}
.cm-icon-doc {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a4458' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3Cline x1='10' y1='9' x2='8' y2='9'/%3E%3C/svg%3E");
}
html.dark .cm-icon-paperclip { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239a92a5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48'/%3E%3C/svg%3E"); }
html.dark .cm-icon-doc { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239a92a5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3Cline x1='10' y1='9' x2='8' y2='9'/%3E%3C/svg%3E"); }

/* ===== 加载/空 ===== */
.cm-loading {
  text-align: center; padding: 24px;
  color: var(--tm); font-size: .85rem;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.cm-spin {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid rgba(232,155,155,.2);
  border-top-color: var(--sm); border-radius: 50%;
  animation: cmSpin .8s linear infinite;
}
@keyframes cmSpin { to { transform: rotate(360deg); } }
.cm-empty {
  text-align: center; padding: 30px 16px;
  color: var(--tm); font-size: .85rem;
  background: rgba(232,155,155,.03); border-radius: 8px;
}

/* ===== 弹窗（通用） ===== */
.cm-overlay {
  position: fixed; inset: 0;
  background: rgba(74,68,88,.35);
  backdrop-filter: blur(3px);
  z-index: 1100;
  display: flex; align-items: center; justify-content: center;
  padding: 16px; animation: cmFadeIn .2s ease;
}
@keyframes cmFadeIn { from { opacity: 0; } to { opacity: 1; } }
.cm-modal {
  background: #fffdfb; border-radius: 8px;
  max-width: 440px; width: 100%; max-height: 90vh;
  display: flex; flex-direction: column;
  box-shadow: 0 12px 40px rgba(74,68,88,.2);
  animation: cmSlideUp .2s ease;
  position: relative;
}
@keyframes cmSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.cm-modal.pending-modal { max-width: 720px; width: 92%; }
.cm-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; font-size: .92rem; font-weight: 600;
  border-bottom: 1px solid rgba(74,68,88,.06);
}
.cm-modal-x {
  width: 26px; height: 26px;
  background: none; border: none;
  font-size: 1.15rem; line-height: 1;
  color: var(--tm); cursor: pointer;
  border-radius: 4px; transition: all .15s;
  display: flex; align-items: center; justify-content: center;
}
.cm-modal-x:hover { background: rgba(74,68,88,.06); color: var(--tp); }
.cm-modal-body { padding: 16px 18px; overflow-y: auto; flex: 1; }
.cm-field { margin-bottom: 12px; }
.cm-field label {
  display: block; font-size: .76rem; color: var(--ts);
  margin-bottom: 4px; font-weight: 500;
}
.cm-field input, .cm-field textarea {
  width: 100%; font-family: var(--ft); font-size: .88rem;
  padding: 8px 12px; background: #fff;
  border: 1px solid rgba(74,68,88,.1); border-radius: 6px;
  color: var(--tp); outline: none; transition: all .2s;
}
.cm-field input:focus, .cm-field textarea:focus {
  border-color: var(--sm);
  box-shadow: 0 0 0 2px rgba(232,155,155,.1);
}
.cm-modal-foot {
  padding: 10px 18px; border-top: 1px solid rgba(74,68,88,.06);
  display: flex; gap: 8px; justify-content: flex-end;
}
.cm-tab-switch {
  text-align: center; padding: 8px 0 0;
  font-size: .8rem; color: var(--tm);
}
.cm-tab-switch a { color: var(--sm); cursor: pointer; text-decoration: none; }
.cm-tab-switch a:hover { text-decoration: underline; }
.cm-msg { font-size: .8rem; margin: 4px 0; min-height: 18px; }
.cm-msg.err { color: #b14b4b; }
.cm-msg.ok { color: #4a8a5a; }

/* ===== 登录/注册弹窗（简洁版） ===== */
.auth-modal { max-width: 340px; }
.cm-auth-close {
  position: absolute; top: 6px; right: 8px;
  width: 26px; height: 26px;
  background: none; border: none;
  font-size: 1.1rem; line-height: 1;
  color: var(--tm); cursor: pointer;
  border-radius: 4px; transition: all .15s;
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
}
.cm-auth-close:hover { background: rgba(74,68,88,.06); color: var(--tp); }
.cm-auth-title {
  font-size: .92rem; font-weight: 600; color: var(--tp);
  padding: 18px 20px 0; text-align: center;
}
.cm-auth-body { padding: 14px 20px 18px; }
.cm-auth-field { margin-bottom: 10px; }
.cm-auth-field input {
  width: 100%; font-family: var(--ft); font-size: .86rem;
  padding: 8px 12px; background: #fff;
  border: 1px solid rgba(74,68,88,.1); border-radius: 6px;
  color: var(--tp); outline: none; transition: all .2s;
}
.cm-auth-field input:focus {
  border-color: var(--sm);
  box-shadow: 0 0 0 2px rgba(232,155,155,.1);
}
.cm-auth-submit {
  width: 100%; font-family: var(--ft);
  font-size: .86rem; font-weight: 500; padding: 9px;
  background: linear-gradient(135deg, var(--sm), #d97f7f);
  color: #fff; border: none; border-radius: 6px;
  cursor: pointer; transition: all .2s;
}
.cm-auth-submit:hover { opacity: .9; }
.cm-auth-submit:disabled { opacity: .5; cursor: not-allowed; }
.cm-auth-switch {
  text-align: center; font-size: .8rem;
  color: var(--tm); margin-top: 12px;
}
.cm-auth-switch a { color: var(--sm); cursor: pointer; text-decoration: none; }
.cm-auth-switch a:hover { text-decoration: underline; }

/* ===== 待审核弹窗 ===== */
.cm-pending-list { display: flex; flex-direction: column; gap: 12px; }
.cm-pending-card {
  background: #fff; border-radius: 8px; padding: 14px;
  display: flex; flex-direction: column; gap: 8px;
  border: 1px solid rgba(74,68,88,.06);
}
.cm-pending-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.cm-pending-avatar {
  width: 24px; height: 24px; border-radius: 50%; object-fit: cover;
}
.cm-pending-avatar.def {
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--sl), var(--sm));
  color: #fff; font-size: .7rem; font-weight: 600;
}
.cm-pending-rid {
  margin-left: auto; font-size: .7rem;
  color: #c97a7a; font-weight: 500;
  padding: 2px 8px; border-radius: 4px;
  background: rgba(232,155,155,.08);
}
.cm-pending-content {
  font-size: .88rem; line-height: 1.6; color: var(--tp);
  white-space: pre-wrap; word-break: break-word;
}
.cm-pending-attachments { display: flex; flex-wrap: wrap; gap: 6px; }
.cm-pending-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* ===== 深色模式 ===== */
html.dark .cm-root { border-top-color: rgba(255,255,255,.06); }
html.dark .cm-count, html.dark .cm-nick, html.dark .cm-item-nick { color: #ddd8e8; }
html.dark .cm-title { color: #ddd8e8; }
html.dark .cm-tabs { background: rgba(255,255,255,.04); }
html.dark .cm-tab { color: #9a92a5; }
html.dark .cm-tab:hover { color: #ddd8e8; }
html.dark .cm-tab.active { background: #3a3548; color: #ddd8e8; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
html.dark .cm-btn { background: #2a2733; border-color: rgba(255,255,255,.08); color: #ddd8e8; }
html.dark .cm-btn:hover { background: #34303e; border-color: rgba(232,155,155,.3); }
html.dark .cm-btn.primary { background: linear-gradient(135deg, var(--sm), #d97f7f); color: #fff; }
html.dark .cm-btn.danger { background: #2a2733; color: #e8a0a0; border-color: rgba(232,160,160,.2); }
html.dark .cm-login-hint { background: rgba(255,255,255,.03); color: #9a92a5; }
html.dark .cm-item { border-bottom-color: rgba(255,255,255,.06); }
html.dark .cm-item.pending { background: rgba(244,185,96,.06); }
html.dark .cm-admin-badge { background: rgba(232,155,155,.2); color: #e8a0a0; }
html.dark .cm-pending-badge { background: rgba(244,185,96,.15); color: #f4b960; }
html.dark .cm-item-content { color: #ddd8e8; }
html.dark .cm-item-content.deleted { color: #6b6378; }
html.dark .cm-action { color: #9a92a5; }
html.dark .cm-action:hover { background: rgba(255,255,255,.05); color: #ddd8e8; }
html.dark .cm-like.liked { color: #e8a0a0; }
html.dark .cm-reply-nick { color: #ddd8e8; }
html.dark .cm-reply-content { color: #ddd8e8; }
html.dark .cm-reply-content.deleted { color: #6b6378; }
html.dark .cm-reply-at { color: #9a92a5; }
html.dark .cm-reply-at b { color: #e8a0a0; }
html.dark .cm-replies { border-left-color: rgba(255,255,255,.06); }
html.dark .cm-reply-toggle { color: #e8a0a0; }
html.dark .cm-compose { background: rgba(42,39,51,.5); }
html.dark .cm-compose-textarea { color: #ddd8e8; }
html.dark .cm-compose-textarea:focus { background: #2a2733; border-color: rgba(232,155,155,.3); }
html.dark .cm-empty { background: rgba(255,255,255,.03); color: #9a92a5; }
html.dark .cm-overlay { background: rgba(0,0,0,.55); }
html.dark .cm-modal { background: #2a2733; box-shadow: 0 12px 40px rgba(0,0,0,.5); }
html.dark .cm-modal-head { color: #ddd8e8; border-bottom-color: rgba(255,255,255,.06); }
html.dark .cm-modal-x { color: #9a92a5; }
html.dark .cm-modal-x:hover { background: rgba(255,255,255,.06); color: #ddd8e8; }
html.dark .cm-field label { color: #9a92a5; }
html.dark .cm-field input, html.dark .cm-field textarea { background: #1e1b25; border-color: rgba(255,255,255,.08); color: #ddd8e8; }
html.dark .cm-field input:focus, html.dark .cm-field textarea:focus { border-color: var(--sm); box-shadow: 0 0 0 2px rgba(232,155,155,.15); }
html.dark .cm-modal-foot { border-top-color: rgba(255,255,255,.06); }
html.dark .cm-tab-switch { color: #9a92a5; }
html.dark .cm-auth-title { color: #ddd8e8; }
html.dark .cm-auth-close { color: #9a92a5; }
html.dark .cm-auth-close:hover { background: rgba(255,255,255,.06); color: #ddd8e8; }
html.dark .cm-auth-field input { background: #1e1b25; border-color: rgba(255,255,255,.08); color: #ddd8e8; }
html.dark .cm-auth-field input:focus { border-color: var(--sm); box-shadow: 0 0 0 2px rgba(232,155,155,.15); }
html.dark .cm-auth-submit { background: linear-gradient(135deg, var(--sm), #d97f7f); }
html.dark .cm-auth-switch { color: #9a92a5; }
html.dark .cm-att { border-color: rgba(255,255,255,.06); }
html.dark .cm-att.file { background: rgba(255,255,255,.04); color: #9a92a5; }
html.dark .cm-pending-card { background: #2a2733; border-color: rgba(255,255,255,.06); }
html.dark .cm-pending-content { color: #ddd8e8; }
html.dark .cm-pending-rid { background: rgba(232,155,155,.15); color: #e8a0a0; }
html.dark .cm-avatar.def, html.dark .cm-item-avatar.def, html.dark .cm-pending-avatar.def, html.dark .cm-reply-avatar.def {
  background: linear-gradient(135deg, #4a4458, #6b6378);
}

/* 响应式 */
@media (max-width: 640px) {
  .cm-replies { margin-left: 16px; }
  .cm-item { padding: 14px 0; }
  .cm-header { flex-direction: column; align-items: flex-start; }
  .cm-modal { max-width: 100%; border-radius: 8px; }
}

/* ===== 个人资料弹窗 ===== */
.profile-modal { max-width: 460px; }
.cm-profile-head {
  display: flex; align-items: center; gap: 16px;
  padding-bottom: 18px; margin-bottom: 18px;
  border-bottom: 1px solid rgba(74,68,88,.06);
}
.cm-profile-avatar-wrap { width: 72px; height: 72px; flex-shrink: 0; }
.cm-profile-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  object-fit: cover; display: block;
}
.cm-profile-avatar.def {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--sl), var(--sm));
  color: #fff; font-size: 1.6rem; font-weight: 600;
}
.cm-profile-info { flex: 1; min-width: 0; }
.cm-profile-nick {
  font-size: 1.05rem; font-weight: 600; color: var(--tp);
  margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cm-profile-email {
  font-size: .78rem; color: var(--tm); margin-bottom: 8px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cm-profile-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.cm-tag {
  font-size: .65rem; font-weight: 500; padding: 2px 8px;
  border-radius: 4px; display: inline-block;
}
.cm-tag-admin { background: rgba(232,155,155,.15); color: #c97a7a; }
.cm-tag-verified { background: rgba(168,216,200,.2); color: #3d6b4f; }
.cm-tag-unverified { background: rgba(244,185,96,.15); color: #b35e1a; }
.cm-profile-section { margin-bottom: 16px; }
.cm-profile-label {
  font-size: .76rem; color: var(--ts); margin-bottom: 6px; font-weight: 500;
}
.cm-profile-input {
  width: 100%; font-family: var(--ft); font-size: .88rem;
  padding: 9px 12px; background: #fff;
  border: 1px solid rgba(74,68,88,.1); border-radius: 6px;
  color: var(--tp); outline: none; transition: all .2s;
}
.cm-profile-input:focus { border-color: var(--sm); box-shadow: 0 0 0 2px rgba(232,155,155,.12); }
.cm-profile-upload {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 14px; background: rgba(232,155,155,.06);
  border-radius: 999px; font-size: .82rem; color: var(--ts);
  cursor: pointer; transition: all .2s;
}
.cm-profile-upload:hover { background: rgba(232,155,155,.12); color: var(--tp); }
.cm-profile-upload-hint { font-size: .72rem; color: var(--tm); margin-top: 6px; }
html.dark .cm-profile-head { border-bottom-color: rgba(255,255,255,.06); }
html.dark .cm-profile-nick { color: #ddd8e8; }
html.dark .cm-profile-email { color: #9a92a5; }
html.dark .cm-profile-input { background: #1e1b25; border-color: rgba(255,255,255,.08); color: #ddd8e8; }
html.dark .cm-profile-input:focus { border-color: var(--sm); }
html.dark .cm-tag-admin { background: rgba(232,155,155,.2); color: #e8a0a0; }
html.dark .cm-tag-verified { background: rgba(168,216,200,.18); color: #80c0a0; }
html.dark .cm-tag-unverified { background: rgba(244,185,96,.15); color: #f4b960; }
html.dark .cm-profile-upload { background: rgba(255,255,255,.04); color: #9a92a5; }
html.dark .cm-profile-upload:hover { background: rgba(255,255,255,.08); color: #ddd8e8; }
