/* 帖子瀑布流 & 详情 */
.feed-page {
  width: min(1100px, calc(100% - 24px));
  margin: 0 auto;
  padding: 20px 0 100px;
}

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

.feed-head h1 {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: -.03em;
}

.feed-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.feed-pub-btn {
  white-space: nowrap;
  border-radius: 999px !important;
  padding: 8px 14px !important;
}

.feed-tabs {
  display: flex;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
}

.feed-tabs a {
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.feed-tabs a.on {
  background: var(--accent);
  color: #fff;
}

.feed-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  background: #fff;
  border-radius: 20px;
  border: 1px solid var(--line);
}

.feed-empty .btn { margin-top: 14px; }

/* 瀑布流 */
.waterfall {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
  width: 100%;
}

.post-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(21, 40, 70, .04);
  width: 100%;
  min-width: 0;
  margin: 0;
}

.post-cover {
  display: block;
  position: relative;
  background: #eef2f6;
  width: 100%;
}

.post-cover img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.post-cover .multi {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 11px;
  font-style: normal;
  padding: 2px 7px;
  border-radius: 999px;
}

.post-body { padding: 12px; }

.post-text {
  display: block;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  margin-bottom: 10px;
  word-break: break-word;
}

.post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.post-user {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
}

.post-user span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pu-av, .pu-av img, .detail-user img, .detail-user .af {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.pu-av {
  background: linear-gradient(135deg, #0d9488, #14b8a6);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}

.pu-av img { width: 100%; height: 100%; }

.post-like {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
}

.post-like i { font-style: normal; }
.post-like.on, .post-like.on i { color: #e11d48; }
.post-time {
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
}

/* 详情 */
.post-detail {
  width: min(560px, calc(100% - 24px));
  margin: 0 auto;
  padding: 16px 0 100px;
}

.detail-bar {
  margin-bottom: 12px;
}

.detail-bar a {
  font-size: 14px;
  color: var(--muted);
}

.detail-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(21, 40, 70, .06);
}

.detail-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.detail-user img, .detail-user .af {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.detail-user .af {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0d9488, #14b8a6);
  color: #fff;
  font-weight: 700;
}

.detail-user strong { display: block; font-size: 15px; }
.detail-user small { color: var(--muted); font-size: 12px; }

.detail-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 14px;
  white-space: pre-wrap;
  word-break: break-word;
}

.detail-imgs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}

.detail-imgs.count-1 {
  grid-template-columns: 1fr;
}

.detail-imgs.count-1 img {
  max-height: 420px;
  width: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.detail-imgs a {
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  display: block;
  cursor: zoom-in;
}

.detail-imgs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-acts {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.post-cmt {
  font-size: 12px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.post-cmt i { font-style: normal; font-size: 11px; }

.post-fav.on, .post-fav.on i { color: #d97706; }

.detail-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.da-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.da-extra {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.detail-actions .post-act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  cursor: pointer;
  white-space: nowrap;
}

.detail-actions .post-act i {
  font-style: normal;
}

.detail-actions .post-act.on {
  border-color: transparent;
}

.detail-actions .post-like.on {
  background: rgba(225, 29, 72, .08);
  color: #e11d48;
}

.detail-actions .post-fav.on {
  background: rgba(217, 119, 6, .1);
  color: #d97706;
}

.detail-actions .muted { color: var(--muted); font-size: 13px; }
.detail-actions .da-card { color: var(--accent); font-weight: 600; }

/* 帖子评论 */
.post-comments {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.pc-head {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}

.pc-head span {
  color: var(--muted);
  font-weight: 500;
  margin-left: 4px;
}

.pc-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.pc-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;
  resize: vertical;
  outline: none;
  background: #f8fafc;
  min-height: 72px;
  line-height: 1.5;
}

.pc-form textarea:focus {
  border-color: var(--accent);
  background: #fff;
}

.pc-form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pc-tip {
  font-size: 12px;
  color: var(--muted);
}

.pc-form-foot .btn {
  min-width: 72px;
}

.pc-login {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}

.pc-login a { color: var(--accent); font-weight: 600; }

.pc-list { display: grid; gap: 12px; }

.pc-empty {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  padding: 16px 0;
}

.pc-item {
  display: flex;
  gap: 10px;
}

.pc-av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #0d9488;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.pc-av img { width: 100%; height: 100%; object-fit: cover; }
.pc-body { flex: 1; min-width: 0; }

.pc-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  margin-bottom: 2px;
}

.pc-meta a { font-weight: 600; color: var(--text); }
.pc-meta time { color: var(--muted); }

.pc-body p {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.5;
  word-break: break-word;
}

/* 发布页 */
.publish-page {
  width: min(560px, calc(100% - 24px));
  margin: 0 auto;
  padding: 16px 0 100px;
}

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

.publish-head h1 { font-size: 18px; }
.publish-head a { color: var(--muted); font-size: 14px; }

.publish-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
}

.publish-form textarea {
  width: 100%;
  border: 0;
  outline: none;
  resize: vertical;
  font: inherit;
  font-size: 15px;
  line-height: 1.6;
  min-height: 140px;
  background: transparent;
}

.publish-imgs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.publish-imgs .prev {
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: #eef2f6;
}

.publish-imgs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.publish-tools {
  margin-bottom: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.add-img {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
}

.add-img small { color: var(--muted); font-weight: 400; font-size: 12px; }

/* 名片页帖子区 */
.card-posts {
  margin: 16px 0;
}

.card-posts-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-posts-title a {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}

.card-posts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.card-posts-grid .post-card {
  margin: 0;
  border-radius: 12px;
}

.card-posts-grid .post-body { padding: 10px; }
.card-posts-grid .post-text { font-size: 13px; }
.card-posts-grid .post-cover img {
  aspect-ratio: 1 / 1;
}

@media (max-width: 1100px) {
  .waterfall { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .waterfall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .feed-page { width: 100%; padding: 12px 12px 100px; }
  .feed-head { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: nowrap; gap: 10px; }
  .feed-head h1 { font-size: 20px; flex-shrink: 0; }
  .feed-head-actions { width: auto; justify-content: flex-end; flex-wrap: nowrap; }
  .post-detail,
  .publish-page { width: 100%; padding-left: 12px; padding-right: 12px; box-sizing: border-box; }

  .detail-card {
    padding: 14px;
    border-radius: 16px;
    border: 0;
    box-shadow: 0 4px 16px rgba(21, 40, 70, .05);
  }

  .detail-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .da-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }

  .detail-actions .post-act {
    width: 100%;
    padding: 11px 10px;
    border-radius: 12px;
    justify-content: center;
  }

  .da-extra {
    margin-left: 0;
    justify-content: space-between;
    width: 100%;
    padding: 0 2px;
  }

  .pc-form textarea {
    font-size: 16px;
    min-height: 80px;
  }

  .pc-form-foot .btn {
    min-width: 88px;
  }

  .pc-item {
    gap: 10px;
  }

  .publish-imgs { grid-template-columns: repeat(3, 1fr); }

  .post-card { border-radius: 12px; }
}

@media (max-width: 420px) {
  .waterfall { gap: 8px; }
  .post-card { border-radius: 12px; }
}
