/* ============================================
   明天聊天 —— 校内内部论坛
   浅色主题 · 单一青色强调色
   ============================================ */

:root {
  --accent: #0f766e;
  --accent-hover: #115e59;
  --accent-soft: #ccfbf1;
  --bg: #f6f7f8;
  --surface: #ffffff;
  --border: #e4e7ea;
  --border-strong: #d3d8dd;
  --text: #1c2429;
  --text-2: #5a6670;
  --text-3: #8a949d;
  --danger: #b4342b;
  --danger-soft: #fdeceb;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(20, 32, 38, 0.06);
  --shadow-lg: 0 8px 28px rgba(20, 32, 38, 0.12);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.container { width: 100%; max-width: 860px; margin: 0 auto; padding: 0 16px; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ---------- Header ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 58px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--text); }
.brand-mark { display: flex; }

.nav {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: 8px;
}
.nav a[data-nav="home"] { color: var(--text-2); font-weight: 500; }
.nav a[data-nav="home"]:hover { color: var(--text); }

.auth-area {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-2);
}
.user-chip .avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.user-chip .badge {
  font-size: 11px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  padding: 1px 7px;
  border-radius: 999px;
  font-weight: 600;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease, border-color 0.15s ease;
  background: none;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }

.btn-outline { border-color: var(--border-strong); color: var(--text-2); background: var(--surface); }
.btn-outline:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }

.btn-ghost { color: var(--text-2); padding: 7px 10px; }
.btn-ghost:hover:not(:disabled) { color: var(--text); background: var(--bg); }

.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: #f9d9d6; }

.btn-sm { padding: 6px 13px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }

/* ---------- Forms ---------- */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-top: 28px;
}
@media (max-width: 520px) { .form-card { padding: 20px 16px; } }

.form-title { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.form-sub { color: var(--text-3); font-size: 13px; margin-bottom: 20px; }

.field { margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--text-2); }

.input, .textarea {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: var(--font);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus, .textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  border-color: var(--accent);
}
.textarea { resize: vertical; min-height: 140px; line-height: 1.7; }

.field-error { color: var(--danger); font-size: 12.5px; }

.form-foot { margin-top: 16px; font-size: 13.5px; color: var(--text-3); }
.form-foot a { font-weight: 500; }

/* ---------- 页面结构 ---------- */
main { flex: 1; padding: 24px 0 48px; }

.page-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.page-title { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.page-desc { color: var(--text-3); font-size: 13.5px; }

/* ---------- 帖子列表 ---------- */
.post-list { display: flex; flex-direction: column; gap: 10px; }

.post-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  animation: fade-up 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--i, 0) * 40ms);
  cursor: pointer;
}
.post-item:hover { border-color: var(--accent); box-shadow: var(--shadow-lg); }

.post-item .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.post-main { flex: 1; min-width: 0; }
.post-title-link { color: var(--text); font-size: 16px; font-weight: 600; display: block; line-height: 1.45; }
.post-title-link:hover { color: var(--accent); }
.post-meta { display: flex; gap: 10px; align-items: center; color: var(--text-3); font-size: 12.5px; margin-top: 4px; flex-wrap: wrap; }
.post-meta .author { color: var(--text-2); font-weight: 500; }
.post-snippet { color: var(--text-2); font-size: 13.5px; margin-top: 6px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.post-stats {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--text-3);
  font-size: 12px;
  flex-shrink: 0;
  padding-top: 4px;
  min-width: 46px;
}
.post-stats .num { font-size: 15px; font-weight: 700; color: var(--text-2); }

/* ---------- 帖子详情 ---------- */
.post-detail {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 28px;
  animation: fade-up 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@media (max-width: 520px) { .post-detail { padding: 18px 16px; } }

.post-detail h1 { font-size: 21px; line-height: 1.5; letter-spacing: -0.01em; }
.post-detail .meta { color: var(--text-3); font-size: 13px; margin: 8px 0 18px; padding-bottom: 16px; border-bottom: 1px solid var(--border); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.post-body { white-space: pre-wrap; word-break: break-word; line-height: 1.8; }

/* v22：作者身份 / 管理身份两个删除按钮可能同时出现，允许换行避免溢出 */
.post-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }

/* ---------- 评论 ---------- */
.comment-section { margin-top: 22px; }
.comment-section h2 { font-size: 16px; margin-bottom: 14px; }

.comment {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 16px;
  margin-bottom: 10px;
  animation: fade-up 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--i, 0) * 40ms);
}
.comment-meta { display: flex; gap: 10px; align-items: center; font-size: 12.5px; color: var(--text-3); margin-bottom: 6px; }
.comment-meta .author { color: var(--text-2); font-weight: 600; }
.comment-meta .del {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-3);
  font-size: 12px;
  cursor: pointer;
  font-family: var(--font);
  padding: 2px 6px;
  border-radius: 6px;
}
.comment-meta .del:hover { color: var(--danger); background: var(--danger-soft); }
.comment-body { white-space: pre-wrap; word-break: break-word; font-size: 14px; }

/* 楼中楼嵌套回复 */
.comment-children { margin-top: 10px; }
.comment-children > .comment {
  margin-bottom: 0;
  margin-left: 4px;
  padding-left: 14px;
  border-left: 3px solid var(--border);
  background: transparent;
}
/* 嵌套层级越深，缩进越收敛，避免无限缩进 */
.comment-children .comment-children > .comment { margin-left: 2px; padding-left: 12px; }
.reply-prefix { font-size: 12.5px; color: var(--text-3); margin-left: 4px; font-weight: 400; }
.reply-to { color: var(--accent); text-decoration: none; cursor: pointer; }
.reply-to:hover { text-decoration: underline; }
.reply-btn { margin-left: 0 !important; }
.reply-slot:empty { display: none; }
.reply-form { margin: 10px 0 2px; padding: 10px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; }
.reply-head { font-size: 13px; color: var(--text-2); margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; }
.reply-head .reply-cancel { background: none; border: none; color: var(--text-3); cursor: pointer; font-size: 12.5px; font-family: var(--font); }
.reply-head .reply-cancel:hover { color: var(--danger); }
.reply-actions { display: flex; justify-content: flex-end; margin-top: 8px; }
.comment-flash { animation: commentFlash 1.5s ease; }
@keyframes commentFlash { 0% { background: var(--accent-soft); } 100% { background: var(--surface); } }

.comment-form { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }

/* ---------- 管理面板 ---------- */
.admin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px; }
@media (max-width: 560px) { .admin-grid { grid-template-columns: 1fr; } }

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.stat-card .stat-num { font-size: 26px; font-weight: 700; color: var(--accent); letter-spacing: -0.02em; }
.stat-card .stat-label { font-size: 13px; color: var(--text-3); margin-top: 2px; }

.admin-section { margin-bottom: 28px; }
.admin-section h2 { font-size: 16px; margin-bottom: 12px; }

/* 可折叠区块：点标题折叠 / 展开，状态记在本机 */
.admin-section-head {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: opacity .15s;
}
.admin-section-head:hover { opacity: .7; }
.sec-caret {
  font-size: 10px;
  color: var(--text-3, #8a8a92);
  line-height: 1;
  flex-shrink: 0;
  transition: transform .15s ease;
}
.admin-section-head.is-collapsed .sec-caret { transform: rotate(-90deg); }
.admin-section-body { margin-top: 2px; }
/* 有待处理时的数量徽章 */
.sec-pending-badge {
  margin-left: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  background: #d9480f;
  padding: 2px 9px;
  border-radius: 999px;
  line-height: 1.4;
  flex-shrink: 0;
}
.admin-collapse-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: -6px 0 16px;
}
/* 表格「展开全部 / 收起」按钮 */
.table-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.admin-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; font-size: 13.5px; box-shadow: var(--shadow); }
.admin-table th, .admin-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.admin-table th { background: var(--bg); font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table .muted { color: var(--text-3); }

/* ---------- v20：后台表格搜索 ---------- */
.sec-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.sec-search .input {
  max-width: 320px;
  padding: 6px 10px;
  font-size: 13px;
}
.sec-search-hint {
  font-size: 12.5px;
  color: var(--text-3, #8a8a92);
  padding: 10px 14px;
  margin-bottom: 10px;
  background: var(--bg, #f6f7f9);
  border: 1px dashed var(--border);
  border-radius: 8px;
}

/* ---------- 状态 ---------- */
.empty-state, .error-state, .loading-state {
  text-align: center;
  padding: 56px 20px;
  color: var(--text-3);
}
.empty-state svg, .error-state svg { margin-bottom: 12px; opacity: 0.5; }
.empty-state p, .error-state p { font-size: 14px; }
.error-state { color: var(--danger); }

.skeleton {
  background: linear-gradient(90deg, #e9ecee 25%, #f2f4f6 50%, #e9ecee 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 8px;
  margin: 0 auto 12px;
  max-width: 640px;
}
.skeleton-title { height: 22px; width: 45%; }
.skeleton-line { height: 14px; width: 90%; }
.skeleton-line.short { width: 55%; }

.loading-state { padding-top: 80px; }

.spinner {
  width: 22px;
  height: 22px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 10px;
}

/* ---------- Toast ---------- */
.toast-wrap {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 200;
  width: min(92vw, 380px);
}
.toast {
  background: #212a30;
  color: #fff;
  padding: 11px 18px;
  border-radius: 10px;
  font-size: 13.5px;
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
  text-align: center;
}
.toast.error { background: var(--danger); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 18px 0 26px;
  color: var(--text-3);
  font-size: 12.5px;
  text-align: center;
  background: var(--surface);
}

/* ---------- Setup 提示条 ---------- */
.setup-banner {
  background: #fffbeb;
  border: 1px solid #f2d48d;
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-top: 28px;
  font-size: 14px;
  line-height: 1.8;
}
.setup-banner strong { display: block; margin-bottom: 4px; }
.setup-banner code { background: #fdf3d8; padding: 1px 6px; border-radius: 5px; font-size: 13px; }

/* ---------- 搜索 + 用户主页（v3） ---------- */
.guest-banner {
  background: #eef7f5;
  border: 1px solid #bfe3dd;
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 18px;
}
.guest-banner a { color: var(--accent); font-weight: 600; }
.search-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.search-form { display: flex; gap: 8px; flex: 1; max-width: 400px; min-width: 220px; }
.search-form .input { flex: 1; min-width: 0; }

a.author-link { color: var(--accent); text-decoration: none; font-weight: 600; }
a.author-link:hover { text-decoration: underline; }

.user-card {
  display: flex;
  gap: 18px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}
.avatar-lg { width: 56px; height: 56px; font-size: 22px; flex: none; }
.user-info { flex: 1; min-width: 200px; }
.user-name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.user-name-row h1 { font-size: 20px; margin: 0; letter-spacing: -0.01em; }
.user-meta { display: flex; gap: 16px; flex-wrap: wrap; color: var(--text-3); font-size: 13px; margin-top: 8px; }
.user-post-count { text-align: center; color: var(--text-3); font-size: 12px; flex: none; }
.user-post-count .num { display: block; font-size: 24px; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }

/* ---------- 动画 ---------- */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- 移动端 ---------- */
@media (max-width: 640px) {
  .header-inner { gap: 10px; }
  .brand-name { display: none; }
  .nav a[data-nav="home"] { display: none; }
  .user-chip .nickname { display: none; }
  .post-item { padding: 13px 14px; }
  .post-stats { display: none; }
  .page-title { font-size: 19px; }
}

/* ---------- 禁言时长弹窗 ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 22, 28, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
  overflow: auto; /* 让内部 sticky 元素能钉在视口底部 */
}
.modal-card.is-tall {
  /* 长弹窗（管理员/站长操作弹窗）：从顶部对齐，sticky 关闭按钮始终可见 */
  align-self: flex-start;
  margin-top: 20px;
  margin-bottom: 20px;
}
.modal-card {
  background: var(--bg-card, #fff);
  border-radius: 14px;
  padding: 24px 26px;
  width: 100%;
  max-width: 340px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  text-align: center;
  animation: toast-in 0.18s ease;
}
.modal-title { font-size: 17px; margin: 0 0 6px; }
.modal-sub { font-size: 13px; color: var(--text-3, #8a8a92); margin: 0 0 18px; }
.mute-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.mute-options .btn { width: 100%; }
.modal-cancel { width: 100%; }

/* 管理员/站长操作弹窗的「常驻底栏」：永远钉在弹窗底部，滚动内容时也不会消失
   用 position:sticky 配合自身的浅色背景 + 上阴影，避免被内容遮挡 */
.modal-cancel.is-pinned {
  position: sticky;
  bottom: 0;
  margin-top: 14px;
  background: var(--bg-card, #fff);
  box-shadow: 0 -6px 14px rgba(0, 0, 0, 0.06);
  z-index: 1;
}

/* ---------- v10：点赞 / 关注 / 名单 ---------- */
.like-bar {
  margin: 14px 0 4px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.like-row { display: flex; align-items: center; gap: 10px; }
.like-count { font-size: 14px; color: var(--text-2); font-weight: 600; }
.like-static { font-size: 13.5px; color: var(--text-2); }
.like-names {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-3);
  background: var(--bg-soft, #f7f7f9);
  border-radius: 8px;
  padding: 8px 12px;
}
.btn-like.liked {
  background: #fdeceb;
  border-color: #f2b8b5;
  color: #b4342b;
}
.user-stats {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-left: auto;
}
.person-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.person-chip {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 13.5px;
  background: var(--bg-card, #fff);
  color: var(--text-1);
  text-decoration: none;
}
.person-chip:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- v11：自定义禁言时长 / 资料申请弹窗 ---------- */
.mute-custom {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}
.mute-custom .input {
  flex: 1;
  min-height: 36px;
  padding: 6px 10px;
  font-size: 14px;
}
.mute-custom .btn { white-space: nowrap; }

/* ============================================
   v12：教师认证 / 信息中心 / 媒体 / 头像 / 团队
   ============================================ */

/* 徽章基础样式（通用：学生 / 教师 / 团队 / 匿名 / 站长 都用它） */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
  padding: 4px 9px;
  border-radius: 999px;
  white-space: nowrap;
  vertical-align: middle;
}

/* 帖子管理：评论已封 / 有违禁词 提示徽章 */
.badge-warn {
  background: #fff3e0;
  color: #b4690e;
  border: 1px solid #f5d78e;
}

.badge-ok {
  background: #e7f6ee;
  color: #137a4b;
  border: 1px solid #a7e0c2;
}

/* v17：登录设备记录 —— 验证步骤指示器 */
.verify-steps { display: flex; gap: 8px; margin: 4px 0 4px; }
.verify-steps .vs {
  width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  background: var(--bg); color: var(--text-3);
  border: 1px solid var(--border);
}
.verify-steps .vs.cur { background: var(--accent); color: #fff; border-color: var(--accent); }
.verify-steps .vs.done { background: #e7f6ee; color: #137a4b; border-color: #a7e0c2; }

/* 帖子详情：编辑于 */
.edited-tag {
  color: var(--text-3);
  font-size: 13px;
  margin-left: 6px;
}

/* 后台帖子编辑记录 */
.edit-log-list { display: block; }
.edit-diff {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}
.edit-diff-col { flex: 1 1 240px; min-width: 220px; }
.edit-diff-h {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 6px;
  letter-spacing: .04em;
}
.edit-diff-title {
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 6px;
  word-break: break-word;
}
.edit-diff-body {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-2);
  background: var(--bg-2);
  border-radius: 8px;
  padding: 8px 10px;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 280px;
  overflow: auto;
}

/* 认证教师蓝色 T 徽章：正圆 */
.badge-t {
  background: #1d4ed8;
  color: #fff;
  font-weight: 800;
  width: 20px;
  height: 20px;
  min-width: 20px;
  padding: 0;
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
  justify-content: center;
  flex-shrink: 0;
}

/* 信息中心铃铛 + 未读角标 */
.notif-bell { position: relative; font-size: 16px; line-height: 1; }
.notif-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--danger, #dc2626);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
}

/* @提及链接 */
.mention-link { color: var(--accent); font-weight: 600; text-decoration: none; border-bottom: 1px dashed var(--accent); }
.mention-link:hover { opacity: 0.8; }

/* 帖子媒体 */
.media-wrap { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 4px; }
.media-img { width: 200px; max-width: 45%; height: auto; border-radius: 10px; border: 1px solid var(--border); display: block; }
.media-video { width: 100%; max-width: 480px; border-radius: 10px; background: #000; }
.file-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--card, #fff); font-size: 13.5px; text-decoration: none; color: var(--text-1);
}
.file-chip:hover { border-color: var(--accent); color: var(--accent); }

/* 发帖页媒体预览 */
.media-thumb {
  position: relative; width: 84px; height: 84px; border-radius: 10px;
  border: 1px solid var(--border); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.media-type-tag { font-size: 11px; color: var(--text-3); text-align: center; padding: 4px; word-break: break-all; }
.media-del {
  position: absolute; top: 3px; right: 3px; width: 20px; height: 20px;
  border: none; border-radius: 50%; background: rgba(0,0,0,0.55); color: #fff;
  font-size: 11px; line-height: 20px; cursor: pointer; padding: 0;
}
.media-del:hover { background: rgba(0,0,0,0.8); }

/* 帖子小标签（不向教师展示） */
.tag-mini {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  background: #fff7e6; color: #b4690e; font-size: 11.5px; font-weight: 600;
  vertical-align: middle; margin-left: 6px;
}

/* 头像图片 */
.avatar { overflow: hidden; }
.avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 信息中心 */
.notif-item {
  display: flex; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px;
  cursor: pointer; transition: border-color 0.15s;
}
.notif-item:hover { border-color: var(--accent); }
.notif-unread { background: #f2faf9; border-color: #b6e2dc; }
.notif-icon { font-size: 18px; line-height: 1.4; }
.notif-main { flex: 1; min-width: 0; }
.notif-title { font-weight: 600; font-size: 14px; }
.notif-unread .notif-title { color: var(--accent); }
.notif-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-left: 4px; }
.notif-body { font-size: 13px; color: var(--text-2); margin-top: 3px; line-height: 1.6; }
.notif-time { font-size: 12px; color: var(--text-3); margin-top: 4px; }

/* 用户主页：简介 + 团队信息 */
.profile-bio {
  margin-top: 12px; padding: 12px 16px; border: 1px solid var(--border);
  border-radius: 10px; font-size: 14px; line-height: 1.7; color: var(--text-2);
}
.profile-bio-label { display: block; font-size: 12px; font-weight: 700; color: var(--text-3); margin-bottom: 4px; }
.team-info-card { margin-top: 12px; padding: 14px 16px; border: 1px solid #e9defc; background: #fbf9ff; border-radius: 10px; }
.team-info-title { font-size: 14px; margin: 0 0 8px; }
.team-info-row { display: flex; gap: 10px; font-size: 13.5px; padding: 3px 0; }
.team-info-row span { color: var(--text-3); min-width: 64px; }

/* 后台详情弹窗网格 */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; font-size: 13.5px; }
.detail-grid > div { display: flex; gap: 8px; padding: 3px 0; }
.detail-grid span { color: var(--text-3); min-width: 60px; }

/* 表单辅助 */
.check-row { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.field-hint { font-size: 12.5px; color: var(--text-3); margin: 4px 0 0; line-height: 1.6; }

@media (max-width: 640px) {
  .detail-grid { grid-template-columns: 1fr; }
  .media-img { width: 42%; }
}

/* @提及自动补全弹层 */
.mention-menu {
  position: fixed;
  z-index: 1000;
  width: 300px;
  max-width: calc(100vw - 16px);
  max-height: 268px;
  overflow-y: auto;
  background: var(--card, #fff);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
  padding: 6px;
}
.mention-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.mention-item.active { background: var(--hover, #f2f7fb); }
.mention-avatar { width: 28px; height: 28px; font-size: 12px; flex: none; }
.mention-text { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; }
.mention-un { font-weight: 700; font-size: 13.5px; }
.mention-nick { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mention-identity { flex: none; font-size: 11px; color: var(--text-3); border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; }
.mention-empty { padding: 12px 14px; font-size: 13px; color: var(--text-3); text-align: center; }

/* v13：匿名发帖 */
.avatar-anon {
  background: #e6e8ec !important;
  color: #8a8a92 !important;
  font-weight: 700;
  user-select: none;
}
.badge-anon { background: #eceef2; color: #5a5a64; }
/* v27：帖主标记 */
.badge-op {
  background: #e8f0ff;
  color: #2b5fd9;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  padding: 1px 5px;
  margin-right: 2px;
  vertical-align: middle;
}
.anon-author { font-weight: 600; color: var(--text-2, #555); }
/* v27：帖主标记情况说明（折叠） */
.op-note {
  margin: 6px 0 10px;
  font-size: 12.5px;
  color: var(--text-3, #888);
}
.op-note > summary {
  cursor: pointer;
  user-select: none;
  color: var(--text-3, #888);
  outline: none;
}
.op-note > summary:hover { color: var(--text-2, #555); }
.op-note-body {
  margin-top: 6px;
  line-height: 1.7;
  background: #fafbfc;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 8px 10px;
}
.anon-warn {
  background: #fff7e6;
  border: 1px solid #f5d78e;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  color: #8a6100;
  line-height: 1.7;
  margin: 8px 0;
}

/* 账号切换面板 */
.chip-caret {
  font-size: 10px;
  color: var(--text-3);
  margin-left: 1px;
}
.user-chip:hover .nickname { color: var(--accent-hover, #333); }
.acct-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
  max-height: 46vh;
  overflow: auto;
}
.acct-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.acct-row:hover { background: var(--bg-2, #f6f7f9); border-color: var(--accent, #4c6ef5); }
.acct-row .avatar { width: 34px; height: 34px; font-size: 14px; }
.acct-info { flex: 1; min-width: 0; }
.acct-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-1, #1a1a1a);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.acct-un {
  font-size: 12.5px;
  color: var(--text-3, #8a8a92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.acct-cur-badge {
  font-size: 11px;
  font-weight: 600;
  background: var(--accent-soft, #eef4ff);
  color: var(--accent-hover, #3b6fd4);
  padding: 1px 7px;
  border-radius: 999px;
  margin-left: 4px;
}
.acct-sys {
  margin: 4px 0 2px;
  padding-top: 12px;
  border-top: 1px dashed var(--border, #e5e7eb);
}
.acct-sys-label {
  font-size: 12px;
  color: var(--text-3, #8a8a92);
  margin: 0 2px 6px;
  letter-spacing: .5px;
}
.acct-sys-row { border-style: dashed; }
.acct-sys-row:hover { border-color: var(--accent, #4c6ef5); }
.sys-badge {
  font-size: 11px;
  font-weight: 600;
  background: #fff4e6;
  color: #d9480f;
  padding: 1px 7px;
  border-radius: 999px;
  margin-left: 4px;
}
.acct-sys-go {
  font-size: 13px;
  color: var(--accent, #4c6ef5);
  font-weight: 600;
  white-space: nowrap;
}
.acct-current { cursor: default; border-color: var(--accent, #4c6ef5); background: var(--accent-soft, #f7faff); }
.acct-check { color: var(--accent, #4c6ef5); font-weight: 700; font-size: 16px; }
.acct-del {
  border: none;
  background: transparent;
  color: var(--text-3, #8a8a92);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  flex-shrink: 0;
}
.acct-del:hover { background: #fdeceb; color: #b4342b; }
.acct-empty {
  font-size: 13.5px;
  color: var(--text-3, #8a8a92);
  text-align: center;
  padding: 18px 0;
  margin: 12px 0;
  border: 1px dashed var(--border, #e5e7eb);
  border-radius: 10px;
}
.acct-actions { display: flex; flex-direction: column; gap: 8px; }

/* 账号详情弹窗：区块标题 / 管理操作 / 恢复默认 */
.adm-h4 {
  font-size: 13.5px;
  margin: 16px 0 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border, #e5e7eb);
}
/* v15：违禁词管理 —— 词块与添加行 */
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.bword-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-2, #f6f7f9); border: 1px solid var(--border, #e5e7eb);
  border-radius: 999px; padding: 3px 6px 3px 12px; font-size: 13px; color: var(--text-1, #1f2937);
}
.bword-chip button {
  border: none; background: transparent; color: var(--danger, #c0392b);
  cursor: pointer; font-size: 15px; line-height: 1; padding: 0 2px;
}
.bword-chip button:hover { font-weight: 700; }
.add-row { display: flex; gap: 8px; align-items: center; max-width: 420px; }
.add-row .input { flex: 1; }
.bword-chip.pending-add { background: #e8f1ff; border-color: var(--accent, #3b6fd4); color: var(--accent-hover, #2a4f9e); font-weight: 600; }
.bword-chip.pending-remove { background: #fdecec; border-color: #f0b4b4; color: #a23b3b; }
.bword-chip.pending-remove s { opacity: .8; }
.adm-ops { display: flex; gap: 8px; flex-wrap: wrap; }
.restore-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.restore-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 10px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
}
.restore-label {
  flex: 1;
  min-width: 90px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-1, #1a1a1a);
}
.restore-locked {
  font-size: 11.5px;
  font-weight: 600;
  color: #b4342b;
  background: #fdeceb;
  padding: 1px 7px;
  border-radius: 999px;
  margin-left: 4px;
}
.restore-locked-note {
  background: #fdeceb;
  border: 1px solid #f5c6c3;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  color: #b4342b;
  line-height: 1.6;
  margin-bottom: 10px;
}

/* ================= v21：私聊（DM） ================= */

/* 小头像（会话列表 / 聊天气泡用） */
.avatar-sm { width: 30px; height: 30px; font-size: 12px; flex: none; }

/* 未读角标：私聊用与通知不同的底色，便于区分 */
.dm-badge { background: var(--accent); }

/* ---------- 会话列表 ---------- */
.dm-list { display: flex; flex-direction: column; gap: 8px; }
.dm-item {
  display: flex; gap: 12px; align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 10px;
  cursor: pointer; transition: border-color 0.15s, background 0.15s;
  text-decoration: none; color: inherit;
}
.dm-item:hover { border-color: var(--accent); background: #fafdfc; }
.dm-unread { background: #f2faf9; border-color: #b6e2dc; }
/* 会话列表头像：.avatar 基类只定义了 overflow，尺寸必须由这里给出，
   否则 span 会按内容撑开，出现「巨大头像 / 布局错乱」的问题 */
.dm-item .avatar {
  width: 40px; height: 40px; font-size: 15px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--accent-soft); color: var(--accent-hover);
  overflow: hidden;
}
.dm-main { flex: 1; min-width: 0; }
.dm-row1 {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 14px;
}
.dm-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-time { margin-left: auto; font-size: 11.5px; color: var(--text-3); font-weight: 400; flex: none; }
.dm-row2 {
  display: flex; align-items: center; gap: 8px; margin-top: 4px;
}
.dm-preview {
  flex: 1; min-width: 0;
  font-size: 13px; color: var(--text-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dm-tags { flex: none; display: flex; gap: 4px; flex-wrap: wrap; }

/* 聊天页：高度用 dvh（移动端地址栏收缩时更准），并给消息区 min-height 兜底，
   避免父容器高度被压缩时 .dm-msgs 塌陷成 0 高度导致「消息看不见」 */
.dm-page {
  display: flex; flex-direction: column;
  height: calc(100dvh - 180px);
  min-height: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.dm-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  flex: none;
}
.dm-back {
  font-size: 24px; line-height: 1; text-decoration: none;
  color: var(--text-2); padding: 0 6px; flex: none;
}
.dm-back:hover { color: var(--accent); }
.dm-head-info { flex: 1; min-width: 0; }
.dm-head-name { font-weight: 600; font-size: 15px; }
.dm-head-sub {
  font-size: 12px; color: var(--text-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 顶部状态提示（受限 / 拉黑等） */
.dm-notice {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 16px;
  background: #fff7e6;
  border-bottom: 1px solid #f5d78e;
  color: #8a6100;
  font-size: 12.5px;
  line-height: 1.6;
  flex: none;
}
.dm-notice-ok { background: var(--accent-soft); border-bottom-color: #99e6d9; color: #115e59; }

/* 消息区：min-height 兜底，防止父容器高度异常时被压缩成 0 导致消息不可见 */
.dm-msgs {
  flex: 1; overflow-y: auto;
  min-height: 200px;
  padding: 16px;
  display: flex; flex-direction: column; gap: 14px;
  background: var(--bg);
}
/* 聊天气泡里的头像：同样需要显式尺寸（.avatar 基类不含尺寸） */
.dm-msg .avatar {
  width: 30px; height: 30px; font-size: 12px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--accent-soft); color: var(--accent-hover);
  overflow: hidden;
}
.dm-head .avatar {
  width: 34px; height: 34px; font-size: 13px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--accent-soft); color: var(--accent-hover);
  overflow: hidden;
}
.dm-msg { display: flex; gap: 8px; align-items: flex-end; }
.dm-msg-mine { flex-direction: row-reverse; }
.dm-msg-body { max-width: 68%; display: flex; flex-direction: column; gap: 4px; }
.dm-msg-mine .dm-msg-body { align-items: flex-end; }
.dm-bubble {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px 12px 12px 4px;
  padding: 9px 13px;
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}
.dm-msg-mine .dm-bubble {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  border-radius: 12px 12px 4px 12px;
}
.dm-bubble.dm-media { padding: 6px; }
.dm-bubble.dm-media .media-img { max-width: 220px; border-radius: 8px; display: block; }
.dm-bubble.dm-media .media-video { max-width: 260px; border-radius: 8px; display: block; }
.dm-bubble.dm-media .file-chip { color: var(--text); }
.dm-msg-mine .dm-bubble.dm-media .file-chip { color: #fff; }
.dm-revoked {
  background: transparent !important;
  border: 1px dashed var(--border-strong) !important;
  color: var(--text-3) !important;
  font-size: 12.5px;
}
.dm-msg-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; color: var(--text-3);
  padding: 0 2px;
}
.dm-recall {
  background: none; border: none; padding: 0;
  color: var(--accent); cursor: pointer;
  font-size: 11.5px; text-decoration: underline;
}
.dm-recall:hover { color: var(--accent-hover); }

/* 输入区 */
.dm-compose {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  flex: none;
}
.dm-compose .input { flex: 1; resize: none; max-height: 120px; min-height: 38px; font-family: inherit; }
.dm-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; flex: none;
  border: 1px solid var(--border); border-radius: 8px;
  cursor: pointer; font-size: 17px;
  background: var(--surface);
}
.dm-icon-btn:hover { border-color: var(--accent); }

@media (max-width: 520px) {
  .dm-page { height: calc(100vh - 120px); }
  .dm-msg-body { max-width: 78%; }
}

/* ---------- v24：直播 ---------- */
.live-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 14px; align-items: start; }
.live-main { min-width: 0; }
.live-head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.live-head-title { font-size: 16px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.live-head-meta { font-size: 13px; color: var(--text-3); }
.live-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; align-items: center; }
.live-reqbar { display: none; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.live-req-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font-size: 13.5px; flex-wrap: wrap; }
.live-req-invite { border-color: #f5d78e; background: #fffdf5; }
.live-stage { position: relative; background: #101014; border-radius: 12px; min-height: 380px; overflow: hidden; display: flex; align-items: stretch; }
.live-tile { position: relative; background: #101014; display: flex; align-items: center; justify-content: center; min-width: 0; }
.live-tile-center { flex: 1; flex-direction: column; gap: 10px; color: #e7e7ea; padding: 20px; }
.live-tile-name { position: absolute; left: 8px; bottom: 6px; z-index: 2; background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 6px; max-width: 90%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.live-avatar-big, .live-avatar-mid { display: flex; align-items: center; justify-content: center; }
.live-avatar-big .avatar { width: 88px; height: 88px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #2a2a31; color: #fff; font-size: 28px; overflow: hidden; }
.live-avatar-mid .avatar { width: 56px; height: 56px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #2a2a31; color: #fff; font-size: 18px; overflow: hidden; }
.live-stage-half { flex: 1; display: flex; }
.live-stage-half .live-tile { flex: 1; }
.live-stage-share { flex: 1; display: flex; }
.live-share-main { flex: 1; min-width: 0; display: flex; }
.live-screen-wrap { position: relative; flex: 1; }
.live-share-side { width: 170px; display: flex; flex-direction: column; border-left: 1px solid #26262c; background: #15151a; }
.live-share-side .live-tile { flex: 1; min-height: 110px; border-bottom: 1px solid #26262c; }
.live-stop-share { position: absolute; right: 10px; top: 10px; z-index: 3; }
.live-audio-col { position: absolute; right: 0; top: 0; bottom: 0; width: 96px; display: flex; flex-direction: column; gap: 8px; padding: 10px 8px; background: rgba(0, 0, 0, .45); overflow: auto; z-index: 2; }
.live-audio-item { display: flex; flex-direction: column; align-items: center; gap: 4px; color: #e7e7ea; font-size: 12px; }
.live-audio-item .avatar { width: 44px; height: 44px; border-radius: 50%; background: #2a2a31; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; overflow: hidden; }
.live-side { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; max-height: calc(100dvh - 140px); }
.live-online { border-bottom: 1px solid var(--border); padding: 8px 10px; max-height: 190px; overflow: auto; }
.live-online-head { font-size: 12px; color: var(--text-3); margin-bottom: 6px; }
.live-online-row { display: flex; align-items: center; gap: 6px; padding: 3px 0; }
.live-online-user { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; font-size: 13.5px; color: var(--text); text-decoration: none; flex-wrap: wrap; }
.live-online-user:hover { color: var(--accent); }
.live-msgs { flex: 1; overflow: auto; padding: 10px; display: flex; flex-direction: column; gap: 6px; min-height: 200px; }
.live-msg { font-size: 13.5px; line-height: 1.5; word-break: break-word; padding: 2px 6px; border-radius: 8px; }
.live-msg-me { background: var(--accent-soft); }
.live-msg-user { color: var(--accent); font-weight: 600; text-decoration: none; margin-right: 6px; }
.live-msg-time { display: block; font-size: 11px; color: var(--text-3); }
.live-compose { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--border); }
.live-compose .input { flex: 1; }
.live-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.live-card { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.live-card-head { display: flex; align-items: center; gap: 8px; font-size: 14px; flex-wrap: wrap; }
.live-card-title { font-size: 15px; font-weight: 600; }
.live-card-meta { display: flex; gap: 12px; font-size: 12.5px; color: var(--text-3); }
.live-mylive-card { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid #f2b8b5; background: #fdf7f6; border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; font-size: 14px; flex-wrap: wrap; }
.live-rec-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; flex-wrap: wrap; }
.live-badge { display: inline-block; margin-top: 6px; padding: 2px 10px; border-radius: 999px; background: var(--danger-soft); color: var(--danger); font-size: 12px; text-decoration: none; }
.avatar-wrap { text-align: center; }
@media (max-width: 900px) {
  .live-grid { grid-template-columns: 1fr; }
  .live-side { max-height: 60vh; }
  .live-share-side { width: 120px; }
}
