/* =========================================================
   百度贴吧风格主题层（tieba.css）
   叠加在 style.css / forum.css 之后加载，覆盖为贴吧 UI/交互
   参考：tieba.baidu.com PC 版视觉规范
   ========================================================= */

/* ---------- 贴吧变量 ---------- */
:root {
  --primary: #4e6ef2;
  --primary-dark: #3f5fe8;
  --primary-light: #f0f4ff;
  --tb-blue: #4e6ef2;
  --tb-blue-dark: #3f5fe8;
  --tb-blue-light: #f0f4ff;
  --tb-red: #f0483e;
  --tb-bg: #f5f6f8;
  --tb-card: #ffffff;
  --tb-border: #e8eaed;
  --tb-text: #333;
  --tb-text-2: #666;
  --tb-text-3: #999;
  --tb-panel: #f7f8fa;
  --tb-radius: 8px;
}

/* ---------- 页面骨架 ---------- */
body {
  background: var(--tb-bg) !important;
  color: var(--tb-text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

.container {
  max-width: 1080px;
}

/* =========================================================
   顶栏（贴吧式：白色 + logo + 导航 + 搜索 + 用户区）
   ========================================================= */
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--tb-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-inner {
  height: 56px;
  gap: 20px;
}

/* logo：红色圆角方块"吧"字 + 品牌文字 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--tb-text) !important;
  text-decoration: none;
  white-space: nowrap;
  background: none;
  -webkit-text-fill-color: currentColor;
}

.brand::before {
  content: '社';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--tb-blue);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.topbar nav a {
  color: var(--tb-text-2);
  font-size: 15px;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  text-decoration: none;
  transition: color .15s, border-color .15s;
}

.topbar nav a.active,
.topbar nav a:hover {
  color: var(--tb-blue);
  border-bottom-color: var(--tb-blue);
}

/* 顶栏搜索框：圆角灰底 */
#global-search-form,
#search-form {
  background: var(--tb-panel) !important;
  border: 1px solid transparent;
  border-radius: 18px !important;
  transition: border-color .15s, background .15s;
}

#global-search-form:focus-within,
#search-form:focus-within {
  background: #fff !important;
  border-color: var(--tb-blue);
}

#global-search-form button[type="submit"],
#search-form button[type="submit"] {
  background: var(--tb-blue) !important;
  border-radius: 14px !important;
  padding: 5px 18px !important;
}

#global-search-form button[type="submit"]:hover,
#search-form button[type="submit"]:hover {
  background: var(--tb-blue-dark) !important;
}

/* 登录按钮（未登录） */
#user-area button#open-login-btn {
  background: var(--tb-blue) !important;
  border-radius: 6px !important;
  padding: 7px 24px !important;
}

/* 顶栏"发新帖"按钮（贴吧式：蓝色圆角） */
.topbar #new-post-btn {
  background: var(--tb-blue) !important;
  border: none !important;
  border-radius: 8px !important;
  color: #fff !important;
  box-shadow: none !important;
  margin: 0 4px 0 0;
}
.topbar #new-post-btn:hover {
  background: var(--tb-blue-dark) !important;
}

#user-area button#open-login-btn:hover {
  background: var(--tb-blue-dark) !important;
}

/* 通知按钮 */
#user-area button#notif-btn {
  color: var(--tb-text-2) !important;
}

#notif-badge {
  background: var(--tb-red) !important;
}

/* 退出按钮 */
#user-area #logout-btn {
  border: 1px solid var(--tb-border) !important;
  color: var(--tb-text-2) !important;
  background: #fff !important;
  border-radius: 6px;
  padding: 4px 14px !important;
  font-size: 13px !important;
}

#user-area #logout-btn:hover {
  color: var(--tb-blue) !important;
  border-color: var(--tb-blue) !important;
}

/* =========================================================
   按钮体系（贴吧蓝）
   ========================================================= */
.btn {
  border-radius: 6px;
}

.btn-primary {
  background: var(--tb-blue) !important;
  border-color: var(--tb-blue) !important;
  color: #fff !important;
  background-image: none !important;
}

.btn-primary:hover {
  background: var(--tb-blue-dark) !important;
  border-color: var(--tb-blue-dark) !important;
  box-shadow: none !important;
}

.btn-outline {
  background: #fff;
  color: var(--tb-blue);
  border: 1px solid var(--tb-blue);
}

.btn-outline:hover {
  background: var(--tb-blue-light);
  color: var(--tb-blue-dark);
}

.btn-danger {
  background: var(--tb-red) !important;
  border-color: var(--tb-red) !important;
}

/* =========================================================
   首页帖子列表：贴吧信息流卡片
   ========================================================= */
.post-list {
  background: transparent !important;
  border-radius: 0 !important;
  padding: 0 !important;
  gap: 10px;
}

.post-card,
.post-item {
  background: var(--tb-card) !important;
  border: 1px solid var(--tb-border) !important;
  border-radius: var(--tb-radius) !important;
  padding: 14px 18px !important;
  margin-bottom: 10px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease !important;
}

.post-card:hover,
.post-item:hover {
  border-color: #c9d4f9 !important;
  box-shadow: 0 4px 16px rgba(78, 110, 242, 0.10) !important;
  transform: translateY(-1px);
  background: #fff !important;
}

/* 标题 */
.post-card > a[href^="/thread.html"],
.post-title {
  color: var(--tb-text) !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: 1.45 !important;
}

.post-card > a[href^="/thread.html"]:hover,
.post-title:hover {
  color: var(--tb-blue) !important;
}

/* 摘要 */
.post-card > div[style*="color:#666"] {
  color: var(--tb-text-2) !important;
}

/* 作者行 */
.post-card img.avatar-img,
.post-card span.avatar-fallback {
  border-radius: 50% !important;
}

/* 操作统计行 */
.post-card a[href^="/thread.html"][style*="display:flex"],
.post-card span[style*="display:flex"] {
  color: var(--tb-text-2) !important;
  font-size: 13px !important;
}

.post-card .like-btn {
  color: var(--tb-text-2) !important;
}

/* =========================================================
   帖子详情页：贴吧楼层结构
   ========================================================= */
.thread {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
}

/* 顶部"吧头"横幅 */
.tb-barhead {
  background: linear-gradient(120deg, #4e6ef2 0%, #6a8cff 100%);
  border-radius: var(--tb-radius);
  color: #fff;
  padding: 18px 22px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  overflow: hidden;
}

.tb-barhead::after {
  content: '';
  position: absolute;
  right: -40px;
  top: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.tb-barhead .bh-name {
  font-size: 22px;
  font-weight: 700;
  z-index: 1;
}

.tb-barhead .bh-sub {
  font-size: 13px;
  opacity: .85;
  margin-top: 3px;
  z-index: 1;
}

.tb-barhead .bh-count {
  margin-left: auto;
  z-index: 1;
  text-align: right;
  font-size: 13px;
  opacity: .92;
  line-height: 1.5;
}

.tb-barhead .bh-count b {
  font-size: 18px;
  display: block;
}

/* 主楼卡片 */
.tb-main-floor {
  background: var(--tb-card);
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  margin-bottom: 12px;
  overflow: hidden;
}

.tb-main-floor .floor-head {
  padding: 14px 18px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tb-main-floor .floor-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--tb-text);
  line-height: 1.4;
  margin: 0;
  word-break: break-word;
}

.tb-main-floor .floor-body {
  padding: 14px 18px;
}

.tb-main-floor .floor-body .thread-content {
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--tb-text);
  white-space: pre-wrap;
  word-break: break-word;
  border: none;
  padding: 0;
  margin: 0;
}

/* 楼主行 */
.tb-author-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--tb-border);
  background: var(--tb-panel);
}

.tb-author-row .tb-author-info {
  flex: 1;
  min-width: 0;
}

.tb-author-row .tb-author-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--tb-text);
}

.tb-author-row .tb-author-time {
  font-size: 12px;
  color: var(--tb-text-3);
  margin-top: 2px;
}

/* 操作条 */
.tb-actions {
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 12px 18px;
  border-top: 1px solid var(--tb-border);
}

.tb-actions .tb-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--tb-text-2);
  cursor: pointer;
  user-select: none;
  transition: color .15s;
}

.tb-actions .tb-action:hover {
  color: var(--tb-blue);
}

.tb-actions .tb-action.liked {
  color: var(--tb-blue);
}

.tb-actions .tb-action.danger:hover {
  color: var(--tb-red);
}

/* ============ 回复楼层：左侧资料栏 + 右侧内容 ============ */
#reply-section {
  background: var(--tb-card);
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  padding: 0 0 14px;
  overflow: hidden;
}

/* 回复区头部 */
.reply-header {
  position: static !important;
  padding: 12px 18px;
  background: #fff;
  border-bottom: 1px solid var(--tb-border);
}

.reply-header-title {
  font-size: 16px !important;
  color: var(--tb-text) !important;
}

.reply-sort-tabs {
  background: var(--tb-panel) !important;
}

.sort-tab.active {
  color: var(--tb-blue) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06) !important;
}

/* 顶部回复输入条 */
.reply-input-bar {
  display: flex !important;
  align-items: flex-end !important;
  gap: 10px !important;
  background: var(--tb-panel) !important;
  border-radius: var(--tb-radius) !important;
  margin: 12px 18px 6px !important;
  border: 1px solid var(--tb-border) !important;
  padding: 10px 12px !important;
}

.reply-input-bar .reply-input {
  flex: 1 !important;
  min-height: 62px !important;
  max-height: 160px !important;
  resize: vertical !important;
  border: 1px solid var(--tb-border) !important;
  border-radius: 6px !important;
  padding: 8px 10px !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
  outline: none !important;
  background: #fff !important;
  box-sizing: border-box !important;
}

.reply-input-bar .reply-input:focus {
  border-color: var(--tb-blue) !important;
}

.reply-input-bar .reply-send-btn {
  flex-shrink: 0 !important;
  height: 36px !important;
  padding: 0 24px !important;
  background: var(--tb-blue) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 6px !important;
  font-size: 14px !important;
  cursor: pointer !important;
}

.reply-input-bar .reply-send-btn:hover {
  background: var(--tb-blue-dark) !important;
}

/* 楼层条目（贴吧风格：顶部一行头像+用户名+时间+楼层号，无左侧栏） */
.reply-item {
  display: block !important;
  padding: 14px 18px !important;
  background: #fff !important;
  border-bottom: 1px solid var(--tb-border) !important;
  margin-bottom: 0 !important;
}

/* 楼层头部行 */
.floor-head-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.floor-head-row .fh-avatar {
  display: inline-flex;
  line-height: 0;
  cursor: pointer;
}

.floor-head-row .fh-avatar img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.floor-head-row .fh-avatar .avatar-fallback {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.floor-head-row .fh-name a {
  font-size: 14px;
  color: var(--tb-blue);
  font-weight: 600;
  text-decoration: none;
}

.floor-head-row .fh-name a:hover {
  color: var(--tb-blue-dark);
  text-decoration: underline;
}

.floor-head-row .fh-time {
  font-size: 12px;
  color: var(--tb-text-3);
}

.floor-head-row .fh-floor {
  margin-left: auto;
  font-size: 12px;
  color: var(--tb-text-3);
  white-space: nowrap;
}

.floor-head-row .lz-tag {
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  height: 16px;
  border-radius: 4px;
  background: var(--tb-red);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
}

/* 回复内容 */
.reply-item .reply-text {
  font-size: 14.5px;
  color: var(--tb-text);
  line-height: 1.75;
  word-break: break-word;
  margin-top: 0;
  padding-right: 0;
}

.reply-item .reply-meta {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--tb-border);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  font-size: 12px;
  color: var(--tb-text-3);
}

.reply-item .reply-actions {
  display: flex;
  gap: 18px;
  font-size: 13px;
  align-items: center;
}

.reply-item .reply-like,
.reply-item .reply-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: var(--tb-text-2);
  user-select: none;
}

.reply-item .reply-like:hover,
.reply-item .reply-action:hover {
  color: var(--tb-blue);
}

.reply-item .reply-like.liked {
  color: var(--tb-blue);
}

.reply-item .reply-more {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  color: var(--tb-text-3);
  margin-left: 4px;
}

.reply-item .reply-more:hover {
  color: var(--tb-blue);
}

/* 楼中楼（子回复） */
.reply-child {
  margin: 0 !important;
  padding: 10px 18px 10px 44px !important;
  background: var(--tb-panel) !important;
  border-top: 1px solid var(--tb-border) !important;
  border-bottom: none !important;
}

.reply-child .floor-head-row {
  margin-bottom: 2px;
}

.reply-child .fh-avatar img,
.reply-child .fh-avatar .avatar-fallback {
  width: 22px;
  height: 22px;
  font-size: 11px;
}

.reply-child .fh-name a {
  font-size: 13px;
}

.reply-child .reply-text {
  font-size: 13.5px;
}

.reply-child .reply-meta {
  border-top: none;
  padding-top: 2px;
  margin-top: 2px;
}

.reply-child .fh-floor {
  display: none;
}

/* 展开更多 */
.expand-thread {
  margin: 10px 18px !important;
  padding: 8px !important;
  background: var(--tb-blue-light) !important;
  color: var(--tb-blue) !important;
  border-radius: 6px !important;
}

/* ============ 底部固定快捷回复条（贴吧式） ============ */
.bottom-reply-bar {
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--tb-border);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.05) !important;
  padding: 10px 20px !important;
}

.bottom-reply-bar .reply-input-bar {
  max-width: 1080px;
  margin: 0 auto;
  border: 1px solid var(--tb-border);
  background: var(--tb-panel) !important;
  padding: 10px 12px !important;
}

.bottom-reply-bar .reply-input-bar .reply-input {
  background: #fff !important;
}

/* ============ 分页（贴吧式） ============ */
.pagination {
  gap: 8px !important;
  padding: 20px 0 30px !important;
  font-size: 14px !important;
}

.pagination .btn {
  border-radius: 6px !important;
  padding: 6px 14px !important;
  font-size: 13px !important;
}

.pagination .page-info {
  color: var(--tb-text-3);
  font-size: 13px;
}

/* ============ 弹窗（登录等）贴吧化 ============ */
.modal-content {
  border-radius: 12px !important;
}

.modal-body .field-input:focus,
.modal-body select.field-input:focus {
  border-color: var(--tb-blue) !important;
  box-shadow: 0 0 0 3px rgba(78, 110, 242, 0.12) !important;
}

.modal-footer .btn-primary {
  background: var(--tb-blue) !important;
  background-image: none !important;
}

.modal-footer .btn-primary:hover {
  background: var(--tb-blue-dark) !important;
}

.modal-body .error {
  color: var(--tb-red);
  background: #fef1f0;
}

/* ============ 表单页（发帖等） ============ */
.form-title {
  color: var(--tb-text);
  font-size: 20px;
}

.card {
  border-radius: var(--tb-radius) !important;
  border-color: var(--tb-border) !important;
}

select.field-input:focus,
textarea.field-input:focus,
.field input:focus,
.field-input:focus {
  border-color: var(--tb-blue) !important;
  box-shadow: 0 0 0 3px rgba(78, 110, 242, 0.10) !important;
}

/* ============ 个人资料 / 个人主页 ============ */
.profile-shell {
  max-width: 760px !important;
}

.profile-card {
  border-radius: var(--tb-radius) !important;
}

.profile-actions .btn {
  border-radius: 6px;
}

/* user.html（他人主页）贴吧化：白卡片 + 蓝色关注按钮 */
.dy-page {
  max-width: 760px !important;
  border-radius: var(--tb-radius) !important;
}

.btn-follow {
  background: var(--tb-blue) !important;
  border-radius: 6px !important;
}

.btn-follow.following {
  background: #f0f0f0 !important;
  color: #666 !important;
}

.btn-edit {
  border-radius: 6px !important;
}

/* ============ 管理后台 ============ */
.stat-card {
  border-color: var(--tb-border) !important;
  border-radius: var(--tb-radius) !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

.stat-num {
  background: none !important;
  -webkit-text-fill-color: var(--tb-blue) !important;
  color: var(--tb-blue) !important;
}

.admin-tab.active {
  background: var(--tb-blue) !important;
  border-color: var(--tb-blue) !important;
}

.admin-table th {
  background: var(--tb-panel) !important;
}

/* ============ 搜索结果高亮 ============ */
mark, .hl {
  background: #fff3bf;
  color: var(--tb-text);
  padding: 0 2px;
  border-radius: 2px;
  font-weight: 600;
}

/* ============ 头像统一切圆 ============ */
.avatar-img,
.avatar-fallback {
  border-radius: 50% !important;
}

/* ============ 帖子工具条（返回 + 固定"帖子"标签，下滑固定顶部） ============ */
.tb-post-toolbar {
  position: sticky;
  top: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 9px 18px;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--tb-border);
}

.tb-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--tb-blue);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.tb-back-btn:hover {
  color: var(--tb-blue-dark);
}

.tb-tabs {
  display: flex;
  align-items: center;
  gap: 18px;
}

.tb-tab-label {
  position: relative;
  font-size: 15px;
  font-weight: 700;
  color: var(--tb-text);
  padding: 4px 2px 8px;
  line-height: 1;
}

.tb-tab-label.active {
  color: var(--tb-blue);
}

.tb-tab-label.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 2px;
  background: var(--tb-blue);
}

@media (max-width: 760px) {
  .tb-post-toolbar {
    padding: 8px 12px;
    gap: 14px;
  }
  .tb-back-btn {
    font-size: 13px;
  }
  .tb-tab-label {
    font-size: 14px;
  }
}

/* ============ 帖子卡片更多按钮（...） ============ */
.post-more-btn:hover {
  background: #f2f3f5;
  color: #666 !important;
}

.post-more-btn svg {
  display: block;
}

/* ============ 空状态 ============ */
.empty {
  color: var(--tb-text-3);
  background: var(--tb-card);
  border: 1px dashed var(--tb-border);
  border-radius: var(--tb-radius);
  padding: 36px 0;
  margin: 10px 0;
}

/* ============ 小屏适配 ============ */
@media (max-width: 760px) {
  .reply-item {
    padding: 12px 12px !important;
  }
  .reply-child {
    padding: 8px 12px 8px 30px !important;
  }
  .floor-head-row .fh-name a {
    font-size: 13px;
  }
  .tb-actions {
    gap: 16px;
  }
}

/* =========================================================
   独立吧页（/board/:id）：吧头 + 吧内模块 + 吧内帖子
   ========================================================= */
.board-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--tb-card);
  border: 1px solid var(--tb-border);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 12px;
}
.board-hero-logo {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  box-shadow: 0 4px 12px rgba(78, 110, 242, 0.18);
  overflow: hidden;
}
.board-hero-logo.has-img { box-shadow: 0 4px 14px rgba(15, 23, 42, 0.16); }
.board-hero-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.board-hero-main { flex: 1; min-width: 0; text-align: left; }
.board-hero-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--tb-text);
  line-height: 1.3;
  margin: 0;
  text-align: left;
}
.board-hero-desc {
  font-size: 13px;
  color: var(--tb-text-3);
  margin: 5px 0 0;
  line-height: 1.6;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.board-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--tb-text-3);
  margin-top: 9px;
}
.board-hero-meta b { color: var(--tb-blue); font-weight: 600; }
.board-hero-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}
.board-hero-actions .btn {
  padding: 9px 20px;
  font-size: 14px;
  white-space: nowrap;
}
.board-follow-btn:hover {
  background: #fff;
  border-color: var(--tb-blue);
  color: var(--tb-blue);
}
.board-follow-btn.is-following {
  color: var(--tb-text-3);
  border-color: var(--tb-border);
}
.board-follow-btn.is-following:hover {
  background: #fff;
  border-color: var(--tb-blue);
  color: var(--tb-blue);
}

/* 模块标签条 */
.board-toolbar {
  background: var(--tb-card);
  border: 1px solid var(--tb-border);
  border-radius: 10px;
  padding: 0 14px;
  margin-bottom: 10px;
  overflow-x: auto;
}
.board-tabs {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 48px;
  white-space: nowrap;
}
.board-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 13px 0 11px;
  border-bottom: 2px solid transparent;
  font-size: 14px;
  color: var(--tb-text-2);
  text-decoration: none;
  transition: color .15s, border-color .15s;
}
.board-tab:hover { color: var(--tb-blue); }
.board-tab.active {
  color: var(--tb-blue);
  font-weight: 600;
  border-bottom-color: var(--tb-blue);
}
.board-tab-cnt {
  font-size: 11px;
  color: var(--tb-text-3);
  background: var(--tb-panel);
  border-radius: 8px;
  padding: 0 6px;
  line-height: 16px;
}
.board-tab.active .board-tab-cnt {
  color: var(--tb-blue);
  background: var(--tb-blue-light);
}

.board-feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--tb-text-3);
  margin: 14px 2px 8px;
}
.board-feed-head b { font-size: 15px; color: var(--tb-text); font-weight: 600; }
.board-home-jump { color: #4e6ef2; text-decoration: none; }
.board-home-jump:hover { text-decoration: underline; }

/* 帖子卡片上的模块标签 */
.post-card a[href*="moduleId="] {
  font-size: 12px;
}

/* ============ 模块自定义弹窗（吧主） ============ */
.module-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 30000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.module-dialog {
  width: 440px;
  max-width: 92vw;
  max-height: 84vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
  padding: 18px 20px 16px;
}
.module-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.module-dialog-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--tb-text);
}
.module-dialog-sub {
  font-size: 12px;
  color: var(--tb-text-3);
  margin-top: 4px;
  line-height: 1.6;
}
.module-dialog-close {
  border: none;
  background: transparent;
  color: var(--tb-text-3);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}
.module-dialog-close:hover { color: var(--tb-text); }

.module-list {
  border: 1px solid var(--tb-border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
}
.module-empty {
  padding: 18px 14px;
  text-align: center;
  font-size: 13px;
  color: var(--tb-text-3);
}
.module-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--tb-border);
}
.module-item:last-child { border-bottom: none; }
.module-item-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.module-item-name {
  font-size: 14px;
  color: var(--tb-text);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.module-item-cnt {
  font-size: 11px;
  color: var(--tb-text-3);
  background: var(--tb-panel);
  border-radius: 8px;
  padding: 0 6px;
  line-height: 16px;
  flex: 0 0 auto;
}
.module-item-ops { display: flex; gap: 4px; flex: 0 0 auto; }
.module-op {
  border: none;
  background: transparent;
  color: var(--tb-blue);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
}
.module-op:hover { background: var(--tb-blue-light); }
.module-op.danger { color: var(--tb-red); }
.module-op.danger:hover { background: #fef1f0; }

.module-add-row { display: flex; gap: 8px; align-items: center; }
.module-add-row .field-input { flex: 1; min-width: 0; height: 36px; }
.module-add-row .btn { flex: 0 0 auto; height: 36px; padding: 0 18px; }
.module-msg {
  min-height: 18px;
  font-size: 12px;
  margin: 8px 0 0;
  color: var(--tb-text-3);
}
.module-msg.ok { color: #1a9c5b; }
.module-msg.err { color: var(--tb-red); }

@media (max-width: 760px) {
  .board-hero {
    padding: 14px 14px;
    gap: 12px;
    flex-wrap: wrap;
  }
  .board-hero-logo { width: 52px; height: 52px; font-size: 22px; border-radius: 12px; }
  .board-hero-name { font-size: 19px; }
  .board-hero-actions { width: 100%; }
  .board-hero-actions .btn { flex: 1; text-align: center; }
  .board-tabs { gap: 16px; }
}

