/* 星群动态 feed 页样式（2026-11-03）
   只补充 community-home.css / space.css 没有的部分；全部用 tokens.css 的变量。 */

/* ---------- 页头 ---------- */
.af-main { min-width: 0; padding: 22px clamp(16px, 2.4vw, 26px) 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); box-shadow: var(--shadow); }
.af-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; }
.af-kicker { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink3); }
.af-head h1 { margin: 5px 0 0; font-size: clamp(22px, 3vw, 28px); line-height: 1.15; letter-spacing: -.03em; }
.af-head-note { margin: 8px 0 0; font-size: 12px; color: var(--ink3); }
.af-head-count { font-size: 12px; color: var(--ink3); white-space: nowrap; }

/* ---------- 发布框 ---------- */
.af-composer { margin-top: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); padding: 12px 14px; }
.af-composer textarea {
  width: 100%; min-height: 76px; resize: vertical; border: 0; outline: none; background: transparent;
  font: inherit; font-size: 14px; line-height: 1.7; color: var(--ink);
}
.af-composer textarea::placeholder { color: var(--ink3); }
.af-composer-bar { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.af-composer-hint { font-size: 11.5px; color: var(--ink3); }
.af-composer-count { margin-left: auto; font-size: 11.5px; color: var(--ink3); font-variant-numeric: tabular-nums; }
.af-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line2);
  background: var(--bg); color: var(--ink); font-size: 12.5px; cursor: pointer;
  transition: background .16s, border-color .16s, color .16s, transform .12s;
}
.af-btn:hover { background: var(--panel2); }
.af-btn:active { transform: translateY(1px); }
.af-btn[disabled] { opacity: .45; cursor: not-allowed; }
.af-btn--primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.af-btn--primary:hover { background: #26262a; border-color: #26262a; }
.af-btn--ghost { border-color: transparent; background: transparent; color: var(--ink2); }
.af-btn--ghost:hover { background: var(--panel2); color: var(--ink); }
.af-btn--sm { height: 28px; padding: 0 10px; font-size: 12px; }

/* 未登录提示 */
.af-login-card { margin-top: 16px; padding: 18px; border: 1px dashed var(--line2); border-radius: 14px; text-align: center; }
.af-login-card p { margin: 0 0 12px; font-size: 13px; color: var(--ink2); }

/* ---------- 标签页 ---------- */
.af-tabs { display: flex; gap: 4px; margin-top: 18px; border-bottom: 1px solid var(--line); }
.af-tab {
  position: relative; border: 0; background: none; cursor: pointer;
  padding: 10px 4px; margin-right: 18px; font-size: 13px; color: var(--ink3);
}
.af-tab:hover { color: var(--ink2); }
.af-tab[aria-selected="true"] { color: var(--ink); font-weight: 600; }
.af-tab[aria-selected="true"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--gold);
}
.af-tab .af-tab-num { margin-left: 4px; font-size: 11px; color: var(--ink3); font-weight: 400; }

/* ---------- 动态列表 ---------- */
.af-list { margin-top: 4px; }
.af-post { display: flex; gap: 12px; padding: 18px 2px; border-bottom: 1px solid var(--line); }
.af-post:last-child { border-bottom: 0; }
.af-av {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%;
  display: grid; place-items: center; background: var(--panel2); color: var(--ink2);
  font-size: 13px; font-weight: 600; overflow: hidden;
}
.af-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.af-post-main { min-width: 0; flex: 1; }
.af-post-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.af-post-name { font-size: 13.5px; font-weight: 600; color: var(--ink); text-decoration: none; }
.af-post-name:hover { text-decoration: underline; }
.af-post-handle { font-size: 11.5px; color: var(--ink3); }
.af-post-time { margin-left: auto; font-size: 11.5px; color: var(--ink3); font-variant-numeric: tabular-nums; }
.af-post-body { margin: 7px 0 0; font-size: 14px; line-height: 1.75; color: var(--ink); white-space: pre-wrap; word-break: break-word; }
.af-post-ref {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 10px;
  padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel2); font-size: 12px; color: var(--ink2); text-decoration: none;
}
.af-post-ref b { color: var(--ink); font-weight: 600; }
.af-post-ref:hover { border-color: var(--line2); }
.af-post-actions { display: flex; align-items: center; gap: 18px; margin-top: 12px; }
.af-act {
  display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; cursor: pointer;
  padding: 4px 0; font-size: 12px; color: var(--ink3); transition: color .16s;
}
.af-act:hover { color: var(--ink); }
.af-act[aria-pressed="true"] { color: var(--gold); }
.af-act[disabled] { opacity: .5; cursor: not-allowed; }
.af-act svg { width: 15px; height: 15px; }

/* ---------- 评论 ---------- */
.af-comments { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel2); }
.af-comments[hidden] { display: none; }
.af-comment-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 10px; max-height: 320px; overflow: auto; }
.af-comment { display: flex; gap: 8px; }
.af-comment .af-av { width: 26px; height: 26px; flex-basis: 26px; font-size: 11px; }
.af-comment-main { min-width: 0; }
.af-comment-head { display: flex; gap: 8px; align-items: baseline; }
.af-comment-name { font-size: 12px; font-weight: 600; }
.af-comment-time { font-size: 11px; color: var(--ink3); }
.af-comment-body { margin: 2px 0 0; font-size: 13px; line-height: 1.65; color: var(--ink2); white-space: pre-wrap; word-break: break-word; }
.af-comment-reply { font-size: 11px; color: var(--ink3); margin-right: 4px; }
.af-comment-empty { font-size: 12px; color: var(--ink3); }
.af-comment-form { display: flex; gap: 8px; }
.af-comment-form input {
  flex: 1; min-width: 0; height: 32px; padding: 0 10px; border: 1px solid var(--line2); border-radius: 8px;
  background: var(--bg); color: var(--ink); font: inherit; font-size: 12.5px;
}
.af-comment-form input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(138,90,43,.10); }

/* ---------- 状态 ---------- */
.af-state { padding: 44px 20px; text-align: center; }
.af-state-icon { width: 40px; height: 40px; margin: 0 auto 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); display: grid; place-items: center; color: var(--ink3); }
.af-state-title { font-size: 14px; font-weight: 600; }
.af-state-desc { margin: 6px auto 0; max-width: 380px; font-size: 12.5px; line-height: 1.7; color: var(--ink3); }
.af-state .af-btn { margin-top: 14px; }
.af-skeleton { display: flex; gap: 12px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.af-sk { background: linear-gradient(90deg, var(--panel2) 0%, #efefeb 50%, var(--panel2) 100%); background-size: 200% 100%; animation: afshimmer 1.2s infinite; border-radius: 6px; }
@keyframes afshimmer { to { background-position: -200% 0; } }
.af-loadmore { display: flex; justify-content: center; padding: 18px 0 4px; }
.af-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--ink); color: #fff; font-size: 12.5px; padding: 9px 14px; border-radius: 8px;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60;
}
.af-toast.is-on { opacity: 1; transform: translateX(-50%) translateY(-4px); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .af-main { padding: 16px 14px 22px; border-radius: 14px; }
  .af-post { padding: 16px 0; }
  .af-post-time { width: 100%; margin-left: 0; order: 3; }
  .af-head { flex-direction: column; align-items: flex-start; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .af-sk { animation: none; }
  .af-toast, .af-btn { transition: none; }
}

/* ---------- 移动端修正（2026-11-03）：社区壳在 flex 下 align-items:start 会把主区压窄 ---------- */
@media (max-width: 820px) {
  .ch-shell { align-items: stretch; }
  .af-main { align-self: stretch; width: auto; order: 2; }
  .ch-sidenav { order: 1; }
}
@media (max-width: 560px) {
  .ch-topbar { padding: 8px 12px; }
  .af-main { padding: 14px 12px 18px; border-radius: 12px; }
}

/* ---------- 动态里的图片 ---------- */
.af-post-media { display: grid; gap: 6px; margin-top: 10px; border-radius: 10px; overflow: hidden; }
.af-post-media[data-count="1"] { grid-template-columns: 1fr; max-width: 420px; }
.af-post-media[data-count="2"] { grid-template-columns: 1fr 1fr; }
.af-post-media[data-count="3"],
.af-post-media[data-count="4"] { grid-template-columns: 1fr 1fr; }
.af-post-media a { display: block; aspect-ratio: 1 / 1; background: var(--panel2); overflow: hidden; }
.af-post-media[data-count="1"] a { aspect-ratio: auto; max-height: 420px; }
.af-post-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 发布框里的待发图片 */
.af-media { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.af-media-item { position: relative; width: 86px; height: 86px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.af-media-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.af-media-rm {
  position: absolute; right: 2px; top: 2px; width: 20px; height: 20px; border-radius: 50%;
  border: 0; background: rgba(11,11,12,.7); color: #fff; font-size: 13px; line-height: 1;
  cursor: pointer; display: grid; place-items: center; padding: 0;
}
.af-media-rm:hover { background: rgba(11,11,12,.9); }

/* ---------- 通知列表（notifications.html） ---------- */
.nf-item { display: flex; gap: 12px; align-items: flex-start; padding: 16px 2px; border-bottom: 1px solid var(--line); cursor: pointer; }
.nf-item:last-child { border-bottom: 0; }
.nf-item:hover { background: var(--panel2); }
.nf-main { min-width: 0; flex: 1; }
.nf-line { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 13px; }
.nf-line b { font-weight: 600; color: var(--ink); }
.nf-kind { font-size: 12.5px; color: var(--ink2); }
.nf-time { margin-left: auto; font-size: 11.5px; color: var(--ink3); font-variant-numeric: tabular-nums; }
.nf-excerpt { margin: 4px 0 0; font-size: 13px; line-height: 1.65; color: var(--ink2); white-space: pre-wrap; word-break: break-word; }
.nf-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--gold); margin-top: 8px; }

/* 顶栏通知角标 */
.af-bell-num {
  display: inline-block; min-width: 16px; height: 16px; padding: 0 4px; margin-left: 4px;
  border-radius: 8px; background: var(--gold); color: #fff; font-size: 10.5px; line-height: 16px;
  text-align: center; font-weight: 600;
}
.af-bell-num[hidden] { display: none; }

/* 通知页顶栏中间说明（不是搜索框） */
.nf-topnote { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--ink3); }
@media (max-width: 820px) {
  .nf-topnote { grid-column: 1 / -1; grid-row: 2; }
}


/* 2026-11-03：动态里的框体去边框，改柔和阴影 */
.af-composer,
.af-comments,
.af-login-card,
.af-post-media {
  border: 0 !important;
  box-shadow: var(--shadow-soft-sm, 0 4px 14px rgba(16,15,12,.05));
}
.af-media-item { border: 0; box-shadow: var(--shadow-soft-sm); }