/* ============================================================
   主题变量（默认暗色，对齐小程序端配色）
   ============================================================ */
:root,
[data-theme="dark"] {
  --bg-page: #0D1117;
  --bg-card: #161B22;
  --bg-card-2: #1C2128;
  --bg-elev: #21262D;
  --bg-input: #0D1117;
  --border: #30363D;
  --border-soft: rgba(48, 54, 61, 0.6);
  --divider: #21262D;
  --text-primary: #F0F6FC;
  --text-secondary: #C9D1D9;
  --text-tertiary: #8B949E;
  --text-muted: #6E7681;
  --accent: #FF9900;
  --accent-soft: rgba(255, 153, 0, 0.10);
  --accent-border: rgba(255, 153, 0, 0.25);
  --blue: #58A6FF;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  --shadow-strong: 0 10px 36px rgba(0, 0, 0, 0.45);
  --skeleton-1: #21262d;
  --skeleton-2: #30363d;
  --scrollbar: rgba(255, 255, 255, 0.12);
}

[data-theme="light"] {
  --bg-page: #F6F8FA;
  --bg-card: #FFFFFF;
  --bg-card-2: #F0F3F6;
  --bg-elev: #EAEEF2;
  --bg-input: #FFFFFF;
  --border: #D0D7DE;
  --border-soft: rgba(208, 215, 222, 0.7);
  --divider: #EAEEF2;
  --text-primary: #1F2328;
  --text-secondary: #424A53;
  --text-tertiary: #57606A;
  --text-muted: #8B949E;
  --accent: #E68A00;
  --accent-soft: rgba(230, 138, 0, 0.10);
  --accent-border: rgba(230, 138, 0, 0.32);
  --blue: #0969DA;
  --shadow: 0 2px 12px rgba(140, 149, 159, 0.18);
  --shadow-strong: 0 12px 32px rgba(140, 149, 159, 0.25);
  --skeleton-1: #EAEEF2;
  --skeleton-2: #D0D7DE;
  --scrollbar: rgba(31, 35, 40, 0.18);
}

/* ============================================================
   Reset / Base
   ============================================================ */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  transition: background-color 0.25s ease, color 0.25s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

/* 把曾经是 div / span 的卡片改成 a 后，统一抹掉默认 a 视觉影响 */
a.feed-project,
a.featured-item,
a.post-card,
a.feed-category-tag,
a.related-post-inner,
a.post-project-bind,
a.brand,
a.avatar-btn,
a.icon-btn {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
/* 卡片 a 都是横向 flex（logo + body） */
a.feed-project,
a.featured-item,
a.post-card,
a.post-project-bind { display: flex; }
a.feed-category-tag { display: inline-flex; align-items: center; }
a.brand { display: inline-flex; align-items: center; gap: 8px; }
a.avatar-btn,
a.icon-btn { display: inline-flex; align-items: center; justify-content: center; }

button {
  font-family: inherit;
  cursor: pointer;
}

img {
  max-width: 100%;
  display: block;
}

/* 滚动条 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--scrollbar);
  border-radius: 4px;
}

/* ============================================================
   顶部导航
   ============================================================ */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

/* 全局容器：所有页面顶层布局共用同一组宽度 / 横向 padding
   注意：所有内层 .xxx-page / .post-detail / .project-detail 等都不再设
   max-width + margin auto；它们填满 .app-main，保证各页边距视觉一致 */
.header-inner,
.app-main {
  max-width: 1320px;
  margin: 0 auto;
  padding-left: 28px;
  padding-right: 28px;
}

.header-inner {
  padding-top: 12px;
  padding-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  cursor: pointer;
}

.brand-tag {
  background: var(--accent);
  color: #000;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1;
}

.brand-name {
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 500;
}

.search-box {
  flex: 1;
  max-width: 480px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 8px 14px;
  cursor: text;
  transition: border-color 0.2s;
}

.search-box:focus-within {
  border-color: var(--accent);
}

.search-box svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.search-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 14px;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: 50%;
  transition: all 0.2s;
}

.icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.avatar-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s;
}

.avatar-btn:hover {
  border-color: var(--accent);
}

.avatar-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 分类条 */
.category-bar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.category-bar-wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding: 10px 28px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-bar-inner {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scroll-behavior: smooth;
  /* 隐藏滚动条，靠两侧按钮翻页 */
  scrollbar-width: none;
}
.category-bar-inner::-webkit-scrollbar { display: none; }

.category-nav {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}
.category-nav:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}
.category-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.category-pill {
  display: inline-block;
  padding: 6px 16px;
  margin-right: 10px;
  font-size: 13px;
  color: var(--text-tertiary);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 18px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.category-pill:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.category-pill.active {
  background: var(--accent);
  color: #000;
  font-weight: 600;
  border-color: var(--accent);
}

/* ============================================================
   主内容容器
   ============================================================ */
.app-main {
  padding-top: 24px;
  padding-bottom: 32px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}

.layout-side {
  /* 自然随主内容滚动，不固定 */
}

@media (max-width: 960px) {
  .layout {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   板块 / 标题
   ============================================================ */
.section {
  margin-bottom: 28px;
}

.section-title {
  position: relative;
  padding-left: 12px;
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 16px;
  background: var(--accent);
  border-radius: 2px;
}

.section-desc {
  font-size: 13px;
  color: var(--text-tertiary);
  margin: -8px 0 16px;
  line-height: 1.6;
}

.live-indicator {
  display: inline-flex;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

/* ============================================================
   AI 动态列表
   ============================================================ */
.ai-news-list {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.ai-news-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  padding: 12px 16px 8px;
  border-bottom: 1px solid var(--divider);
}

.ai-news-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--divider);
  transition: background 0.2s;
  text-decoration: none;
  gap: 12px;
}

.ai-news-item:last-child {
  border-bottom: none;
}

.ai-news-item:hover {
  background: var(--bg-card-2);
}

.ai-news-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ai-news-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ai-news-overview {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ai-news-time {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  margin-top: 2px;
}

.ai-news-empty {
  padding: 28px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
}

/* ============================================================
   精选板块 - grid 自适应换行
   ============================================================ */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.featured-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.featured-item:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.featured-logo {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--bg-elev);
}

.featured-info {
  flex: 1;
  min-width: 0;
}

.featured-name {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.featured-intro {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ============================================================
   信息流卡片（项目）
   ============================================================ */
.feed-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 项目卡片：左 logo + 右文字块（标题、统计、简介、分类、日期都在文字块里） */
.feed-project {
  display: flex;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.feed-project:hover {
  border-color: var(--accent);
  background: var(--bg-card-2);
}

.feed-logo {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  flex-shrink: 0;
  object-fit: cover;
  background: var(--bg-elev);
}

.feed-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.feed-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.feed-name {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.feed-stats {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.feed-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  background: transparent;
  border: none;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
}
.feed-stat-chip svg { width: 12px; height: 12px; }

.feed-intro {
  font-size: 13px;
  color: var(--text-tertiary);
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feed-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 2px;
}

.feed-category-row {
  display: flex;
  gap: 4px;
  flex-wrap: nowrap;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

.feed-category-tag {
  flex-shrink: 0;
  padding: 1px 8px;
  font-size: 11.5px;
  color: var(--text-tertiary);
  background: transparent;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: color 0.15s;
  white-space: nowrap;
}
.feed-category-tag::before {
  content: '#';
  margin-right: 2px;
  color: var(--text-muted);
}
.feed-category-tag:hover { color: var(--accent); }

.feed-date {
  font-size: 11.5px;
  color: var(--text-muted);
  flex-shrink: 0;
  white-space: nowrap;
}

/* 兼容旧的 .feed-divider（已不再使用） */
.feed-divider { display: none; }

.star-color { color: #FFD700; }
.fork-color { color: var(--blue); }

/* ============================================================
   阅读卡片
   ============================================================ */
.feed-reading {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
}

.feed-reading:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.reading-cover {
  width: 180px;
  height: 130px;
  flex-shrink: 0;
  object-fit: cover;
  background: var(--bg-elev);
}

.reading-placeholder {
  width: 180px;
  height: 130px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  opacity: 0.35;
  background: linear-gradient(135deg, var(--bg-elev) 0%, var(--bg-card-2) 100%);
}

.reading-info {
  flex: 1;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.reading-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 6px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.reading-summary {
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.5;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.reading-footer {
  margin-top: auto;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.reading-author {
  font-size: 11px;
  color: var(--blue);
  background: rgba(88, 166, 255, 0.1);
  padding: 2px 8px;
  border-radius: 6px;
}

.reading-time {
  font-size: 11px;
  color: var(--text-muted);
}

/* ============================================================
   按钮 / 表单
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--accent);
  color: #000;
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
  transition: all 0.2s;
  cursor: pointer;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn span {
  white-space: nowrap;
  line-height: 1.2;
}

.btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-block {
  width: 100%;
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-primary);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-danger {
  background: #DA3633;
  color: #fff;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 500;
}

.form-input {
  width: 100%;
  padding: 11px 14px;
  font-size: 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}

.form-input:focus {
  border-color: var(--accent);
}

.form-input::placeholder {
  color: var(--text-muted);
}

/* ============================================================
   登录页
   ============================================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 10%, var(--accent-soft) 0%, transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(88, 166, 255, 0.08) 0%, transparent 40%),
    var(--bg-page);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 32px;
  box-shadow: var(--shadow-strong);
  position: relative;
}

.auth-theme-toggle {
  position: absolute;
  top: 16px;
  right: 16px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.auth-brand .brand-tag {
  font-size: 15px;
  padding: 6px 12px;
}

.auth-brand .brand-name {
  font-size: 17px;
}

.auth-subtitle {
  color: var(--text-tertiary);
  font-size: 13px;
  margin: 0 0 24px;
}

.auth-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 22px;
  background: var(--bg-input);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.auth-tab {
  flex: 1;
  padding: 8px;
  text-align: center;
  font-size: 13px;
  color: var(--text-tertiary);
  cursor: pointer;
  border-radius: 7px;
  transition: all 0.2s;
}

.auth-tab.active {
  background: var(--accent);
  color: #000;
  font-weight: 600;
}

.auth-error {
  background: rgba(218, 54, 51, 0.1);
  border: 1px solid rgba(218, 54, 51, 0.3);
  color: #FF7B72;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  margin-bottom: 14px;
}

[data-theme="light"] .auth-error {
  color: #B02A21;
}

.auth-footer {
  margin-top: 18px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================================
   骨架屏
   ============================================================ */
.skeleton {
  background: linear-gradient(90deg, var(--skeleton-1) 25%, var(--skeleton-2) 50%, var(--skeleton-1) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 4px;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skel-feed-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 12px;
  display: flex;
  gap: 14px;
}

.skel-logo { width: 56px; height: 56px; border-radius: 12px; flex-shrink: 0; }
.skel-line { height: 14px; margin-bottom: 8px; }
.skel-line.short { width: 40%; }
.skel-line.med { width: 65%; }

/* ============================================================
   项目详情
   ============================================================ */
.project-detail { width: 100%; }

.project-header {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 20px;
}

.project-header-top {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.project-detail-logo {
  width: 84px;
  height: 84px;
  border-radius: 16px;
  background: var(--bg-elev);
  flex-shrink: 0;
  object-fit: cover;
}

.project-detail-info {
  flex: 1;
  min-width: 0;
}

.project-detail-name {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px;
}

.project-detail-intro {
  font-size: 14px;
  color: var(--text-tertiary);
  line-height: 1.6;
  margin: 8px 0 14px;
}

.project-detail-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 12px;
}

.project-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 12px;
  color: var(--text-secondary);
}

.project-meta-item svg { width: 12px; height: 12px; }

.project-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.project-categories {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.section-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 26px;
  margin-bottom: 16px;
}

.section-block h3 {
  margin: 0 0 12px;
  font-size: 16px;
  color: var(--text-primary);
}

.markdown-content {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
  word-wrap: break-word;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3 {
  color: var(--text-primary);
  margin: 1em 0 0.4em;
}

.markdown-content pre {
  background: var(--bg-input);
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 12px;
}

.markdown-content code {
  background: var(--bg-input);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}

.markdown-content pre code {
  background: transparent;
  padding: 0;
}

.markdown-content a {
  color: var(--blue);
  text-decoration: underline;
}

.markdown-content img {
  max-width: 100%;
  border-radius: 6px;
  margin: 8px 0;
}

.back-bar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--text-tertiary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  line-height: 1;
}

.back-bar svg { width: 14px; height: 14px; flex-shrink: 0; }
.back-bar span { white-space: nowrap; }

.back-bar:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ============================================================
   个人中心
   ============================================================ */
.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  gap: 22px;
  align-items: center;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bg-elev);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--text-tertiary);
  font-weight: 600;
  overflow: hidden;
  flex-shrink: 0;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-info-name {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.profile-info-email {
  color: var(--text-tertiary);
  font-size: 13px;
  margin-top: 4px;
}

.profile-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
}

/* ============================================================
   状态 / 提示 / 加载
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state .icon {
  font-size: 48px;
  opacity: 0.4;
  margin-bottom: 8px;
}

.loading-state {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 13px;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--text-muted);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 6px;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

#toast-container {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 10px 18px;
  border-radius: 100px;
  font-size: 13px;
  box-shadow: var(--shadow-strong);
  animation: toast-in 0.25s ease-out;
}

.toast.error {
  border-color: rgba(218, 54, 51, 0.4);
  color: #FF7B72;
}

.toast.success {
  border-color: var(--accent);
  color: var(--accent);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   富文本：项目详情 description / README
   尽量贴近 GitHub 的视觉层次
   ============================================================ */
.rich-content {
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.7;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.rich-content > *:first-child { margin-top: 0; }
.rich-content > *:last-child  { margin-bottom: 0; }

.rich-content h1,
.rich-content h2,
.rich-content h3,
.rich-content h4,
.rich-content h5,
.rich-content h6 {
  color: var(--text-primary);
  margin: 1.4em 0 0.6em;
  font-weight: 700;
  line-height: 1.3;
}
.rich-content h1 {
  font-size: 26px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-soft);
}
.rich-content h2 {
  font-size: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-soft);
}
.rich-content h3 { font-size: 17px; }
.rich-content h4 { font-size: 15px; }
.rich-content h5 { font-size: 13.5px; }
.rich-content h6 { font-size: 12.5px; color: var(--text-tertiary); }

.rich-content p { margin: 0.8em 0; }

.rich-content ul,
.rich-content ol {
  padding-left: 26px;
  margin: 0.8em 0;
}
.rich-content ul { list-style: disc; }
.rich-content ol { list-style: decimal; }
.rich-content li { margin: 4px 0; }
.rich-content li > ul,
.rich-content li > ol { margin: 4px 0; }

/* 任务列表（GitHub 风格 [ ] [x]） */
.rich-content li input[type="checkbox"] {
  margin: 0 6px 0 0;
  vertical-align: middle;
}
.rich-content li.task-list-item { list-style: none; margin-left: -20px; }

.rich-content pre {
  background: var(--bg-input);
  border: 1px solid var(--border);
  padding: 14px 16px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
  margin: 1em 0;
}

.rich-content code {
  background: var(--bg-input);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--accent);
  border: 1px solid var(--border-soft);
}

.rich-content pre code {
  background: transparent;
  padding: 0;
  color: var(--text-secondary);
  border: none;
}

.rich-content a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.rich-content a:hover { text-decoration: none; }

.rich-content img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 8px 0;
  background: var(--bg-elev);
}

/* GitHub README 常用：picture/source 主题切换图 */
.rich-content picture { display: inline-block; max-width: 100%; }
.rich-content picture img { display: inline-block; }

/* center 居中常见结构 */
.rich-content [align="center"],
.rich-content center {
  text-align: center;
  display: block;
  margin: 12px 0;
}
.rich-content [align="center"] img { margin: 8px auto; }

.rich-content blockquote {
  border-left: 4px solid var(--accent);
  margin: 1em 0;
  padding: 6px 0 6px 16px;
  color: var(--text-tertiary);
  background: var(--bg-card-2);
  border-radius: 0 6px 6px 0;
}

.rich-content hr {
  border: none;
  border-top: 1px solid var(--border-soft);
  margin: 1.6em 0;
}

.rich-content table {
  border-collapse: collapse;
  margin: 1em 0;
  width: 100%;
  display: block;
  overflow-x: auto;
}
.rich-content th,
.rich-content td {
  border: 1px solid var(--border);
  padding: 8px 14px;
  text-align: left;
}
.rich-content th {
  background: var(--bg-elev);
  font-weight: 600;
  color: var(--text-primary);
}
.rich-content tr:nth-child(2n) td { background: var(--bg-card-2); }

.rich-content details {
  margin: 0.8em 0;
  padding: 10px 14px;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.rich-content details > summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text-primary);
  user-select: none;
  outline: none;
}
.rich-content details[open] > summary { margin-bottom: 8px; }

.rich-content kbd {
  display: inline-block;
  padding: 2px 6px;
  font-size: 11px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 1px 0 var(--border);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* GitHub README 用的 badge / 徽章常常是 img，已被通用 img 规则覆盖 */
.rich-content video { max-width: 100%; height: auto; }

/* ============================================================
   个人中心
   ============================================================ */
.profile-page { width: 100%; }

.profile-hero {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  margin-bottom: 20px;
}

.profile-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 0% 0%, var(--accent-soft) 0%, transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(88, 166, 255, 0.10) 0%, transparent 55%);
  pointer-events: none;
}

.profile-hero-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 32px 32px;
}

.profile-avatar-lg {
  width: 96px;
  height: 96px;
  font-size: 38px;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  flex-shrink: 0;
}

.profile-hero-info { flex: 1; min-width: 0; }

.profile-name {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.profile-email {
  color: var(--text-tertiary);
  font-size: 13px;
  word-break: break-all;
}

.profile-desc {
  margin: 10px 0 0;
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.6;
}

.profile-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 100px;
}

.profile-badge.admin {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent-border);
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 16px;
}

@media (max-width: 720px) {
  .profile-grid { grid-template-columns: 1fr; }
  .profile-hero-inner { flex-direction: column; text-align: center; padding: 28px 20px; }
  .profile-avatar-lg { margin: 0 auto; }
}

.profile-card-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.profile-block-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--divider);
}

.profile-block-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.profile-list {
  list-style: none;
  margin: 0;
  padding: 6px 0;
}

.profile-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 20px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--divider);
}

.profile-list li:last-child { border-bottom: none; }

.profile-list .k {
  color: var(--text-muted);
  font-size: 12.5px;
}

.profile-list .v {
  color: var(--text-primary);
  max-width: 60%;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-actions-grid {
  display: flex;
  flex-direction: column;
  padding: 8px;
  gap: 6px;
}

.profile-action-tile {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
}

.profile-action-tile:hover {
  background: var(--bg-card-2);
  border-color: var(--border);
}

.profile-action-tile.danger:hover {
  border-color: rgba(218, 54, 51, 0.45);
  background: rgba(218, 54, 51, 0.06);
}

.profile-action-tile.danger .tile-title { color: #FF7B72; }
[data-theme="light"] .profile-action-tile.danger .tile-title { color: #B02A21; }

.tile-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  font-size: 18px;
  background: var(--bg-elev);
  border-radius: 10px;
  flex-shrink: 0;
}

.tile-icon svg { width: 18px; height: 18px; color: var(--accent); }

.tile-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.tile-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.tile-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================================
   Header: nav + 通知铃铛
   ============================================================ */
.header-nav {
  display: flex;
  gap: 4px;
  align-items: center;
}

.header-nav-link {
  position: relative;
  padding: 7px 14px;
  font-size: 13.5px;
  color: var(--text-tertiary);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.header-nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-card-2);
}

.header-nav-link.active {
  color: var(--accent);
  background: var(--accent-soft);
}

.header-bell { position: relative; }

.bell-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: #DA3633;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  text-align: center;
  border-radius: 100px;
  border: 2px solid var(--bg-card);
}

@media (max-width: 720px) {
  .header-nav { display: none; }
}

/* ============================================================
   通用：页面标题 / 按钮小尺寸 / 头像 fallback
   ============================================================ */
.page-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--text-primary);
}

.page-sub {
  color: var(--text-tertiary);
  font-size: 13px;
  margin: 0 0 18px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12.5px;
  border-radius: 7px;
}

.btn-sm svg { width: 14px; height: 14px; }

.avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elev);
  color: var(--text-tertiary);
  font-weight: 600;
  border-radius: 50%;
  border: 1px solid var(--border);
}

.link-btn {
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  padding: 4px 6px;
  font-size: 12.5px;
  cursor: pointer;
  border-radius: 5px;
}
.link-btn:hover { color: var(--accent); background: var(--bg-card-2); }
.link-btn.danger { color: #FF7B72; }
[data-theme="light"] .link-btn.danger { color: #B02A21; }

/* 状态徽章 */
.status-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 100px;
  vertical-align: middle;
}
.status-badge.status-published,
.status-badge.status-published {
  color: #2EA043;
  background: rgba(46, 160, 67, 0.12);
  border: 1px solid rgba(46, 160, 67, 0.3);
}
.status-badge.status-pending {
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
}
.status-badge.status-rejected {
  color: #DA3633;
  background: rgba(218, 54, 51, 0.12);
  border: 1px solid rgba(218, 54, 51, 0.3);
}

/* ============================================================
   社区帖子列表
   ============================================================ */
.posts-page {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

/* 侧栏（首页 & 帖子详情共用） */
.side-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 14px;
}
.side-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--divider);
}
.side-post-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.side-post-item {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--divider);
}
.side-post-item:last-child { border-bottom: none; padding-bottom: 0; }

/* 左文右图布局 */
.side-post-link {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  text-decoration: none;
}
.side-post-text {
  flex: 1;
  min-width: 0;
}
.side-post-cover {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--bg-elev);
}

.side-post-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.side-post-link:hover .side-post-title { color: var(--accent); }
.side-post-meta {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--text-muted);
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}
.side-post-cat {
  color: var(--accent);
}

/* 二维码模块样式 */
.qrcode-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.qrcode-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.qrcode-item img {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  border-radius: 8px;
  border: 1px solid var(--border);
  object-fit: cover;
  background: var(--bg-card);
}
.qrcode-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.qrcode-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 4px;
}
.qrcode-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 帖子详情双栏布局 */
.post-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}
.post-detail-main,
.post-detail-side { min-width: 0; }
@media (max-width: 1024px) {
  .post-detail-grid { grid-template-columns: 1fr; }
}

/* 帖子分类筛选条（两级 pill：顶级 + 子级） */
.post-cat-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 0;
}
.post-cat-bar + .post-cat-bar-sub {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-soft);
}
.post-cat-bar:last-child { margin-bottom: 18px; }

.post-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 5px 14px;
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.post-cat-pill:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.post-cat-pill.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  font-weight: 600;
}

/* 第二行（子分类）更紧凑、低对比度 */
.post-cat-pill-sub {
  padding: 3px 11px;
  font-size: 12px;
  color: var(--text-tertiary);
  background: transparent;
  border-color: transparent;
}
.post-cat-pill-sub:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--bg-card);
}
.post-cat-pill-sub.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent-border);
  font-weight: 600;
}

.posts-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  margin-bottom: 20px;
  gap: 12px;
}
.posts-head .page-sub { grid-column: 1 / 2; margin-bottom: 0; }
.posts-head .btn { grid-row: 1 / 3; grid-column: 2 / 3; align-self: center; }

.posts-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 横向布局：左侧 100×80 缩略图（可选）+ 右侧文字 */
.post-card {
  display: flex;
  align-items: stretch;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.18s ease;
  overflow: hidden;
}

.post-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-2);
}

.post-card-cover {
  position: relative;
  flex-shrink: 0;
  width: 120px;
  height: 90px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-elev);
}
.post-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.post-card-cover-count {
  position: absolute;
  bottom: 6px;
  right: 6px;
  padding: 1px 8px;
  font-size: 10.5px;
  color: #fff;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 100px;
}

.post-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1;
  flex-wrap: wrap;
}
.post-card-avatar {
  width: 18px !important;
  height: 18px !important;
  border-radius: 50%;
  font-size: 10px !important;
  object-fit: cover;
  flex-shrink: 0;
}
.post-card-name {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 12px;
}
.post-card-dot { color: var(--text-muted); }
.post-card-time { color: var(--text-muted); }

.post-card-cat {
  margin-left: 4px;
  padding: 1px 8px;
  font-size: 11px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: 100px;
}

.post-card-title {
  margin: 2px 0 4px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}
.post-card:hover .post-card-title { color: var(--accent); }

.post-card-excerpt {
  margin: 0;
  font-size: 13px;
  color: var(--text-tertiary);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-foot {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 11.5px;
}
.post-card-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.post-card-stat svg { width: 12px; height: 12px; }
.post-card-stat-eye { font-size: 11.5px; }

@media (max-width: 600px) {
  .post-card-cover { width: 84px; height: 70px; }
  .post-card { padding: 12px; gap: 12px; }
}

/* ============================================================
   发帖 / 编辑器
   ============================================================ */
.editor-page {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.editor-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.editor-topbar .back-bar { margin-bottom: 0; }
.editor-mode-label {
  font-size: 12.5px;
  color: var(--text-muted);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.editor-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: visible;
  box-shadow: var(--shadow);
  position: relative;
}

.editor-title {
  width: 100%;
  border: none !important;
  background: transparent !important;
  font-size: 28px !important;
  font-weight: 700;
  padding: 28px 32px 10px !important;
  border-radius: 0 !important;
  color: var(--text-primary);
  letter-spacing: 0.2px;
  line-height: 1.4;
}
.editor-title::placeholder {
  color: var(--text-muted);
  font-weight: 600;
}
.editor-title:focus { outline: none; }

.editor-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 28px;
  background: var(--bg-card);
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
}

.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  font-size: 12.5px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
}
.tool-btn span { white-space: nowrap; }
.tool-btn:hover {
  background: var(--bg-card-2);
  color: var(--accent);
}
.tool-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

/* 纯图标的 B / I 按钮做成方形小图标 */
.editor-toolbar .tool-btn[data-cmd] {
  width: 32px;
  height: 32px;
  padding: 0;
  justify-content: center;
}
.tool-sep {
  width: 1px;
  height: 16px;
  background: var(--border);
  margin: 0 4px;
}
.tool-hint {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-muted);
}

.editor-content {
  min-height: 360px;
  padding: 22px 32px 32px;
  outline: none;
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.8;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

.editor-content.is-empty::before {
  content: attr(data-placeholder);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 16px;
}

.editor-content b,
.editor-content strong { font-weight: 700; }
.editor-content i,
.editor-content em { font-style: italic; }
.editor-content p { margin: 0.6em 0; }
.editor-content p:first-child { margin-top: 0; }

.editor-content img {
  max-width: 100%;
  border-radius: 8px;
  margin: 8px 0;
}

.editor-content.dragover {
  background: var(--accent-soft);
  outline: 2px dashed var(--accent);
  outline-offset: -10px;
}

.editor-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  border-top: 1px solid var(--divider);
  background: var(--bg-card);
}

.char-count {
  font-size: 12px;
  color: var(--text-muted);
}

.editor-foot-actions {
  display: flex;
  gap: 8px;
}

/* ============================================================
   帖子详情 + 评论
   ============================================================ */
.post-detail {
  width: 100%;
  /* 不再限宽，让外层 .app-main 的 max-width: 1320 控制 */
}

.post-article {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 16px;
}

.post-article-title {
  margin: 0 0 18px;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
}

/* 帖子正文里的图片：上限可控，避免一张大图把整页撑爆 */
.post-article-body img {
  max-width: 100%;
  max-height: 480px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 14px auto;
  border-radius: 8px;
  background: var(--bg-elev);
  cursor: zoom-in;
}
.post-article-body p { margin: 0.6em 0; }
.post-article-body { font-size: 15px; line-height: 1.8; }

.post-article-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--divider);
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}

.post-article-author {
  display: flex;
  align-items: center;
  gap: 10px;
}
.post-article-author .comment-avatar { width: 40px; height: 40px; }
.author-name { font-weight: 600; color: var(--text-primary); font-size: 14px; }
.author-time { color: var(--text-muted); font-size: 12px; margin-top: 2px; }

.post-owner-actions { display: flex; gap: 8px; }

.post-article-body { font-size: 15px; }

.comment-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 28px;
}

.comment-title {
  margin: 0 0 18px;
  font-size: 16px;
  color: var(--text-primary);
}

.comment-compose {
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 18px;
}
.compose-textarea {
  resize: vertical;
  background: transparent !important;
  border: none !important;
  padding: 8px !important;
  min-height: 60px;
  font-family: inherit;
}
.compose-textarea:focus { outline: none; }

.compose-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}

.comment-compose-guest {
  text-align: center;
  padding: 18px;
  color: var(--text-tertiary);
  background: var(--bg-card-2);
  border: 1px dashed var(--border);
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 18px;
}
.comment-compose-guest a {
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
}

/* 评论列表 */
.comment-thread {
  padding: 16px 0;
  border-bottom: 1px solid var(--divider);
}
.comment-thread:last-child { border-bottom: none; }

.comment-root {
  display: flex;
  gap: 12px;
}

.comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}
.comment-avatar.comment-avatar-sm { width: 28px; height: 28px; font-size: 12px; }
.comment-avatar.avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.comment-root-body,
.comment-reply-body {
  flex: 1;
  min-width: 0;
}

.comment-meta {
  font-size: 12.5px;
  color: var(--text-tertiary);
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.comment-meta b { color: var(--text-primary); font-weight: 600; }
.comment-meta .reply-to b { color: var(--blue); }
.comment-time { color: var(--text-muted); font-size: 12px; }

.comment-text {
  margin-top: 4px;
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.comment-actions {
  margin-top: 4px;
  display: flex;
  gap: 8px;
}

.reply-form-slot:not(:empty) {
  margin-top: 10px;
}

.comment-replies {
  margin-top: 12px;
  margin-left: 48px;
  padding-left: 12px;
  border-left: 2px solid var(--divider);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-reply {
  display: flex;
  gap: 10px;
}

#comment-list .highlight {
  animation: highlight-flash 2s ease;
}
@keyframes highlight-flash {
  0%   { background: var(--accent-soft); }
  60%  { background: var(--accent-soft); }
  100% { background: transparent; }
}

/* 分页 */
.pagination {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 18px;
}

.page-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.2s;
}
.page-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}
.page-btn.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  font-weight: 600;
}
.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.page-ellipsis { padding: 0 4px; color: var(--text-muted); }
.page-info { color: var(--text-tertiary); font-size: 12.5px; margin: 0 6px; }

/* ============================================================
   通知中心
   ============================================================ */
.notif-page { width: 100%; }

.notif-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.notif-list {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.notif-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 18px;
  border-bottom: 1px solid var(--divider);
  cursor: pointer;
  position: relative;
  transition: background 0.15s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg-card-2); }
.notif-item.unread { background: var(--accent-soft); }
.notif-item.unread:hover { background: var(--accent-soft); filter: brightness(1.05); }

.notif-body { flex: 1; min-width: 0; }

.notif-line {
  font-size: 13.5px;
  color: var(--text-secondary);
}
.notif-line b { color: var(--text-primary); font-weight: 600; margin-right: 4px; }

.notif-preview {
  margin-top: 4px;
  color: var(--text-tertiary);
  font-size: 12.5px;
  font-style: italic;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notif-time {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.unread-dot {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.notif-pagination {
  margin-top: 14px;
  text-align: center;
}

/* ============================================================
   个人中心：tabs + 管理列表
   ============================================================ */
.profile-hero-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.profile-tabs {
  display: flex;
  gap: 4px;
  margin: 18px 0 14px;
  padding: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.profile-tab {
  flex: 1;
  padding: 9px 16px;
  text-align: center;
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.profile-tab:hover { color: var(--text-primary); }
.profile-tab.active {
  background: var(--accent);
  color: #000;
  font-weight: 600;
}

.tab-badge {
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  background: #DA3633;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  border-radius: 100px;
}
.profile-tab.active .tab-badge { background: #fff; color: var(--accent); }

.profile-tab-content { min-height: 200px; }

.manage-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.manage-item {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
}

.manage-item-main { flex: 1; min-width: 0; }

.manage-item-title {
  display: inline-block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  vertical-align: middle;
}
.manage-item-title:hover { color: var(--accent); }

.manage-item-excerpt {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-tertiary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.manage-item-foot {
  margin-top: 8px;
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.manage-item-comment.is-clickable {
  cursor: pointer;
  transition: all 0.15s;
}
.manage-item-comment.is-clickable:hover {
  border-color: var(--accent);
  background: var(--bg-card-2);
}
.manage-item-on {
  color: var(--text-muted);
  font-size: 12px;
}
.manage-item-on em {
  font-style: normal;
  color: var(--accent);
}

.manage-item-link {
  color: var(--blue);
  cursor: pointer;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.manage-item-link:hover { text-decoration: underline; }

.manage-item-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .manage-item { flex-direction: column; }
  .manage-item-actions { width: 100%; }
}

/* ============================================================
   发帖：紧凑 meta 行（分类 + 关联项目）
   ============================================================ */
.editor-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  border-top: 1px solid var(--divider);
  flex-wrap: wrap;
}

.meta-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.meta-cell-flex { flex: 1; min-width: 200px; }

.meta-cell-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  flex-shrink: 0;
}

.meta-cell-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.meta-divider {
  width: 1px;
  height: 18px;
  background: var(--border-soft);
}

/* 紧凑下拉 / 输入框 */
.meta-select,
.meta-input {
  height: 30px;
  padding: 0 28px 0 10px;
  font-size: 12.5px;
  color: var(--text-primary);
  background: var(--bg-card-2);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%238b949e' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 14px;
  max-width: 160px;
}
.meta-select:hover,
.meta-input:hover { border-color: var(--accent); }
.meta-select:focus,
.meta-input:focus { border-color: var(--accent); }
.meta-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.meta-input {
  cursor: text;
  background-image: none;
  padding: 0 10px;
  min-width: 0;
  flex: 1;
  max-width: none;
  width: 100%;
}

/* 项目搜索控件区 */
.project-bind-control {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.project-bind-search-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.project-bind-search-wrap .meta-input {
  width: 220px;
  flex: 0 0 220px;
}

/* "+ 关联项目" 启动按钮：虚线小按钮，hover 才高亮 */
.meta-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 12px;
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--text-tertiary);
  border-radius: 6px;
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  line-height: 1;
}
.meta-add-btn:hover {
  border-color: var(--accent);
  border-style: solid;
  color: var(--accent);
}
.meta-add-btn svg { width: 12px; height: 12px; flex-shrink: 0; }

.meta-cancel-btn {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
}
.meta-cancel-btn:hover { color: var(--text-primary); background: var(--bg-card-2); }
.meta-cancel-btn svg { width: 14px; height: 14px; }

/* 已选项目 chip：紧凑内联 */
.project-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 6px 0 4px;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 12.5px;
  color: var(--text-primary);
  max-width: 100%;
}
.project-chip-logo {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: var(--bg-elev);
  flex-shrink: 0;
  object-fit: cover;
}
.project-chip-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}
.project-chip-x {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-elev);
  border: none;
  color: var(--text-tertiary);
  font-size: 14px;
  line-height: 16px;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.project-chip-x:hover {
  background: #DA3633;
  color: #fff;
}

.project-suggestions {
  position: absolute;
  z-index: 10;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-strong);
  max-height: 320px;
  overflow-y: auto;
}

.suggestion-item {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--divider);
}
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover { background: var(--bg-card-2); }
.suggestion-item img {
  width: 32px; height: 32px;
  border-radius: 6px;
  background: var(--bg-elev);
  flex-shrink: 0;
  object-fit: cover;
}
.suggestion-name {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
}
.suggestion-intro {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

/* 旧的 .project-selected 大橙色卡片样式已被 .project-chip 取代 */

/* ============================================================
   帖子详情：关联项目卡片
   ============================================================ */
.post-project-bind {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin: 0 0 18px;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.post-project-bind:hover { border-color: var(--accent); }
.post-project-bind img {
  width: 40px; height: 40px;
  border-radius: 8px;
  background: var(--bg-elev);
  flex-shrink: 0;
  object-fit: cover;
}
.post-project-bind .bind-label {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
}
.post-project-bind .bind-name {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 600;
  margin-top: 2px;
}
.post-project-bind .bind-intro {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 600px;
}

/* ============================================================
   项目详情：左右两栏布局
   ============================================================ */
.project-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
  align-items: start;
}

.project-detail-left,
.project-detail-right {
  min-width: 0;
}

.project-detail-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (max-width: 1100px) {
  .project-detail-grid {
    grid-template-columns: 1fr;
  }
}

.count-pill {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: 100px;
  vertical-align: middle;
}

.btn-block {
  display: flex;
  width: 100%;
}

.load-more-btn {
  margin-top: 14px;
  font-size: 13px;
}

.load-more-end {
  margin-top: 14px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12.5px;
}

/* ============================================================
   项目详情：section block 头部 + 相关帖子列表
   ============================================================ */
.section-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.section-block-head h3 { margin: 0; }

.related-posts {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.related-post {
  display: flex;
  padding: 12px 0;
  border-bottom: 1px solid var(--divider);
  cursor: pointer;
}
.related-post:last-child { border-bottom: none; }
.related-post:hover .related-post-title { color: var(--accent); }

.related-post-main { flex: 1; min-width: 0; }

.related-post-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.15s;
}
.related-post-foot {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ============================================================
   项目留言：消息内附件 + 简易 compose
   ============================================================ */
.msg-attachments {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.msg-attachments img {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  background: var(--bg-elev);
}

.msg-compose .compose-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.msg-compose-images {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.compose-image-item {
  position: relative;
  width: 80px; height: 80px;
}
.compose-image-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.compose-image-remove {
  position: absolute;
  top: 2px; right: 2px;
  width: 20px; height: 20px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 14px;
  line-height: 18px;
  cursor: pointer;
}

/* ============================================================
   Modal 通用弹窗
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modal-fade-in 0.15s ease;
}
@keyframes modal-fade-in { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-strong);
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  animation: modal-slide-in 0.2s ease;
}
@keyframes modal-slide-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--divider);
}
.modal-head h3 {
  margin: 0;
  font-size: 16px;
  color: var(--text-primary);
}
.modal-close { border: none; }

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-foot {
  padding: 14px 20px;
  border-top: 1px solid var(--divider);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* 设置弹窗 */
.settings-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 18px;
}
.settings-tab {
  flex: 1;
  padding: 8px;
  text-align: center;
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  font-size: 13px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s;
}
.settings-tab.active {
  background: var(--accent);
  color: #000;
  font-weight: 600;
}

.avatar-edit-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.profile-avatar-md {
  width: 64px;
  height: 64px;
  font-size: 22px;
  flex-shrink: 0;
}
.avatar-edit-actions {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}
.avatar-edit-actions .hint {
  font-size: 12px;
  color: var(--text-muted);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

textarea.form-input { font-family: inherit; resize: vertical; }

/* 个人中心列表里的分类 chip / 收藏 logo */
.cat-chip {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  font-size: 11px;
  color: var(--blue);
  background: rgba(88, 166, 255, 0.12);
  border: 1px solid rgba(88, 166, 255, 0.25);
  border-radius: 100px;
  vertical-align: middle;
}

.manage-item .fav-logo {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: var(--bg-elev);
  object-fit: cover;
  flex-shrink: 0;
}

/* 响应式 */
@media (max-width: 720px) {
  .header-inner,
  .category-bar-wrap,
  .app-main {
    padding-left: 14px;
    padding-right: 14px;
  }
  .header-inner { padding-top: 10px; padding-bottom: 10px; gap: 10px; }
  .brand-name { display: none; }
  .app-main { padding-top: 16px; padding-bottom: 24px; }
  .project-header { padding: 20px; }
  .comment-replies { margin-left: 24px; }
  .editor-content { padding: 16px; }
  .post-article { padding: 20px; }
  .comment-section { padding: 16px; }
  .project-bind-row { flex-direction: column; gap: 8px; }
  .project-bind-label { padding-top: 0; }
}
