/* =========================================================
   左侧导航栏（仿贴吧）：首页 / 我的帖子 等列表页共用
   ========================================================= */

.home-layout {
  position: relative;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: gap .22s ease;
}
.home-layout.collapsed { gap: 0; }
.home-main { flex: 1 1 auto; min-width: 0; }
.home-side {
  width: 208px;
  flex: 0 0 auto;
  min-width: 0;
  /* 固定在屏幕上：页面下滑时左侧栏不跟着滚走（顶栏 56px + 间距 13px） */
  position: sticky;
  top: 69px;
  max-height: calc(100vh - 81px);
  overflow-x: hidden;
  overflow-y: auto;
  transition: width .22s ease, opacity .18s ease;
}
.home-layout.collapsed .home-side { width: 0; opacity: 0; }

.side-menu {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin-bottom: 18px;
}
.side-boards {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
}

.side-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 12px;
  border-radius: 8px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  transition: background .16s ease, color .16s ease;
}
.side-item:hover { background: #f0f2f5; }
.side-item.active { background: #f0f2f5; color: #333; font-weight: 500; }
.side-item svg { flex: 0 0 auto; }

.side-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #999;
  margin: 2px 0 8px 6px;
  padding-right: 6px;
}

.side-manage {
  color: #4e6ef2;
  font-size: 12px;
  text-decoration: none;
  padding: 2px 6px;
  border-radius: 6px;
  transition: background .15s;
}

.side-manage:hover { background: #eef2ff; color: #4e6ef2; }

.side-board {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  transition: background .16s ease;
}
.side-board:hover { background: #f0f2f5; }
.side-board.active { background: #f0f2f5; }
.side-board-ico {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  overflow: hidden;
}
.side-board-ico img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.side-board-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 500;
}
.side-board-tag {
  flex: 0 0 auto;
  font-size: 10px;
  line-height: 1;
  color: #e0533d;
  background: #fff1ee;
  border-radius: 3px;
  padding: 3px 4px;
}

/* 折叠/展开手柄（半圆，固定在视口，悬停放大） */
.side-toggle {
  position: fixed;
  left: 208px;
  top: 32vh;
  transform: translate(-50%, -50%);
  width: 22px;
  height: 46px;
  padding: 0;
  border: 1px solid #e8eaed;
  border-left: none;
  border-radius: 0 22px 22px 0;
  background: #fff;
  color: #999;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  box-shadow: 1px 0 4px rgba(0, 0, 0, .05);
  transition: left .22s ease, transform .16s ease, color .16s ease, box-shadow .16s ease;
}
.side-toggle:hover {
  color: #4e6ef2;
  transform: translate(-50%, -50%) scale(1.15);
  box-shadow: 2px 0 10px rgba(78, 110, 242, .25);
}
.side-toggle svg { transition: transform .2s ease; }
.home-layout.collapsed .side-toggle svg { transform: rotate(180deg); }

@media (max-width: 900px) {
  .home-layout { gap: 0; }
  .home-layout .home-side, .home-layout .side-toggle { display: none; }
}

/* 首页信息流顶部：吧标签筛选（全部 / 各吧） */
.feed-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 10px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}
.feed-tabs::-webkit-scrollbar { display: none; }
.feed-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.feed-head .feed-tabs {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}
.feed-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.feed-actions .btn {
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 13px;
  white-space: nowrap;
}
.feed-tab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  height: 30px;
  padding: 0 13px;
  border-radius: 15px;
  font-size: 13px;
  color: #333;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.feed-tab:hover { background: #f2f4f8; color: #4e6ef2; }
.feed-tab.active {
  background: #4e6ef2;
  color: #fff;
  font-weight: 500;
}
.feed-tab-cnt {
  font-size: 12px;
  color: #bbb;
}
.feed-tab.active .feed-tab-cnt { color: rgba(255, 255, 255, .82); }

/* 首页「独家入驻」主站编辑入口（仅主站管理员 / 站点管理员） */
.side-board-row { position: relative; }
.side-board-row .side-board { padding-right: 42px; }
.side-board-row .side-board.has-edit .side-board-tag { display: none; }
.side-board-edit {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  height: 26px;
  padding: 0 3px;
  border: 0;
  background: transparent;
  color: #5b6474;
  font: inherit;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}
.side-board-edit:hover { color: #4e6ef2; }

@media (max-width: 760px) {
  .feed-head { flex-direction: column; align-items: stretch; }
  .feed-actions { justify-content: flex-end; }
  .feed-actions .btn { height: 32px; }
  .feed-tabs { padding: 7px 8px; gap: 4px; }
  .feed-tab { height: 28px; padding: 0 11px; font-size: 12px; }
}
