/* ============================================================================
   话题广场 · 互动 tab（P3 · 2026-11-15）
   ----------------------------------------------------------------------------
   来源：开发文档/++话题广场/原型/多tab版-主页面.html 的互动段样式
   （原型 259~350 行）。数值、断点、类名**照抄**，改动只有七类，逐条列在这：

     1. 只搬「首屏 6 块」用到的规则；二级层（.soc-layer / .soc-view / .soc-rw /
        .soc-utabs 等）本期不做（落点＝线上 /user.html，见方案决策），不搬死样式；
     2. `.soc-empty, .soc-fallback, .soc-guest { display:none; }` 这条原型规则不照抄：
        原型靠 hash 状态类显隐，我们是 JS 直接渲染对应分支（只输出一种），
        若保留 display:none 会让壳里那张未登录静态卡永远不显示 ⇒ 关 JS 时白屏；
     3. `.soc-av` 由「文字圆」改为「图片容器」：真实站点有头像图，文字圆只当兜底；
     4. `.soc-more` / 「换一批」由 span[role=link] 改成 button，补 reset（原型是
        div 演示页，没考虑 button 的默认边框背景）；
     5. 新增 `.soc-guest-static`：壳里那张未登录卡必须默认可见（未登录/关 JS 都靠它）；
     6. 新增 `.soc-tipbar[hidden]` 显式规则：.soc-tipbar 是 flex，作者样式会压过
        [hidden]（圈子 tab 踩过同型：.cb-item 是 flex，hidden 不生效）；
     7. 11-16 D142：栅格回到原型两列、推荐卡回到一行一人（原「单列」是 11-15
        容器 744px 前提下的权宜，D129 撤全局右栏后容器 1148px，前提已不成立）。

   为什么单独一个文件：square.css 被 news.html / library.html 复用，动它连带影响
   那两个页面（11-15 的教训）。全部规则挂在 .soc- 前缀下，不外溢。
   ========================================================================== */

.sq-social-wrap { display: block; }
.soc-wrap { display: block; }

/* ---------- D1 顶部提示条 ---------- */
.soc-tipbar { display:flex; align-items:center; gap:8px; padding:8px 12px; background:#f2f8f4; border:1px solid #c7e3d1; border-radius:8px; margin-bottom:12px; font-size:12.5px; color:#14532d; }
.soc-tipbar[hidden] { display:none; }
.soc-tipdot { flex:0 0 auto; width:6px; height:6px; border-radius:50%; background:#188038; }
.soc-tiptxt { flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.soc-tiplink { flex:0 0 auto; color:#188038; font-weight:bold; text-decoration:none; white-space:nowrap; }
.soc-tiplink:hover { text-decoration:underline; }

/* ---------- 栅格 ----------
   照抄原型（:269）：1fr + 300px 两列。
   11-15 曾因「互动区嵌在 .sq-main，容器实测 744px，切 300px 后主栏只剩 430px
   会截断标题」改过单列 —— 那个前提在 11-16 D129 撤掉广场全局右栏（no-side）
   之后已经不成立：容器实测 **1148px**，切完主栏 834px，比原型的 792px 还宽。
   条件变了就回到原型，不再保留单列权宜。（11-16 D142） */
.soc-cols { display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:14px; align-items:start; }
.soc-main, .soc-side { min-width:0; display:flex; flex-direction:column; gap:12px; }
.soc-card { background:#fff; border:1px solid #e3e8ee; border-radius:8px; padding:13px 15px; }
.soc-h { display:flex; align-items:baseline; gap:8px; padding-bottom:7px; border-bottom:1px solid #eef2f6; }
.soc-ht { font-size:14px; font-weight:bold; color:#14532d; }
.soc-hs { font-size:11px; color:#9aa7b2; }
.soc-more { margin-left:auto; font-size:11.5px; color:#188038; padding:5px 2px 0; cursor:pointer; position:relative; text-decoration:none; }
.soc-more::after { content:''; position:absolute; inset:-8px -6px; }
.soc-more:hover { text-decoration:underline; }
/* 「换一批」是按钮：去掉浏览器默认外观，视觉与 .soc-more 一致 */
button.soc-more { background:none; border:0; font-family:inherit; }
button.soc-more:disabled { color:#c2ccd6; cursor:default; }

/* ---------- D2 个人卡 ---------- */
.soc-me-top { display:flex; align-items:center; gap:10px; }
.soc-av { flex:0 0 auto; width:42px; height:42px; border-radius:50%; background:#e8f3ec; color:#14532d; font-size:15px; font-weight:bold; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.soc-av img { width:100%; height:100%; object-fit:cover; display:block; }
.soc-av.sm { width:30px; height:30px; font-size:12px; }
.soc-me-id { flex:1 1 auto; min-width:0; }
.soc-me-name { font-size:14px; font-weight:bold; color:#1f2d3d; display:flex; align-items:baseline; gap:6px; }
.soc-lv { font-size:10.5px; font-weight:normal; color:#8a6d3b; background:#fdf6e3; border:1px solid #f0e0b8; border-radius:3px; padding:0 4px; }
.soc-me-bio { font-size:11.5px; color:#9aa7b2; margin-top:3px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.soc-home { flex:0 0 auto; font-size:11.5px; color:#188038; text-decoration:none; border:1px solid #c7e3d1; border-radius:4px; padding:3px 9px; white-space:nowrap; }
.soc-home:hover { background:#f2f8f4; }
.soc-nums { display:flex; gap:26px; margin-top:11px; padding-top:10px; border-top:1px solid #eef2f6; }
.soc-num { display:flex; align-items:baseline; gap:5px; text-decoration:none; }
.soc-num b { font-size:15px; color:#1f2d3d; font-variant-numeric:tabular-nums; }
.soc-num span { font-size:11.5px; color:#8a97a3; }
.soc-num:hover b { color:#188038; }

/* ---------- 列表（D3 我的发帖 / D4 关注动态） ---------- */
.soc-list { margin:0; padding:0; list-style:none; }
.soc-item { display:flex; align-items:baseline; gap:8px; padding:6px 2px; border-bottom:1px dashed #f4f7f9; font-size:12.5px; cursor:pointer; }
.soc-item:last-child { border-bottom:0; }
.soc-item > a.soc-t { text-decoration:none; }
.soc-t { flex:1 1 auto; min-width:0; color:#1f2d3d; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.soc-item:hover .soc-t { color:#188038; }
.soc-who { flex:0 0 auto; font-size:10.5px; color:#7d8a97; background:#f4f7f9; border:1px solid #e6ebf0; border-radius:3px; padding:0 4px; }
.soc-src { flex:0 0 auto; font-size:10px; color:#8a6d3b; background:#fdf6e3; border:1px solid #f0e0b8; border-radius:3px; padding:0 4px; }
.soc-m { flex:0 0 auto; font-size:11px; color:#9aa7b2; font-variant-numeric:tabular-nums; }

/* ---------- D5 可能认识的人 ---------- */
.soc-ppl { margin:0; padding:0; list-style:none; }
.soc-p { display:flex; align-items:center; gap:9px; padding:7px 2px; border-bottom:1px dashed #f4f7f9; }
.soc-p:last-child { border-bottom:0; }
.soc-pinfo { flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:2px; }
.soc-pn { font-size:12.5px; color:#1f2d3d; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; text-decoration:none; }
.soc-pn:hover { color:#188038; }
.soc-pm { font-size:10.5px; color:#9aa7b2; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.soc-fbtn { flex:0 0 auto; font-size:11px; color:#188038; background:#fff; border:1px solid #c7e3d1; border-radius:4px; padding:2px 8px; cursor:pointer; white-space:nowrap; }
.soc-fbtn:hover { background:#f2f8f4; }
.soc-fbtn.on { color:#8a97a3; border-color:#e3e8ee; background:#f7f9fb; }
.soc-fbtn:disabled { cursor:default; }
/* 「换一批」居中（原型 :315） */
.soc-more-line { text-align:center; padding-top:3px; }

/* ---------- D6 我关注的（右栏小卡，原型 :394-401） ----------
   11-15 搬样式时按「首屏六块」筛，漏了这三条 ⇒ 三个头像竖着堆成一列、28px 尺寸、
   且「共 N 人 →」不靠右。数值照原型：26px 头像、gap 6px、margin-left:auto。 */
.soc-mini { display:flex; align-items:center; gap:6px; padding:9px 2px 2px; }
.soc-mini .soc-av.sm { width:26px; height:26px; font-size:11px; }
/* text-decoration:none 是必须的：原型这里是 <span>（天生无下划线），我们是 <a>（跳关注列表），
   不写就会被浏览器默认下划线画在「共 N 人 →」上。 */
.soc-mini-more { margin-left:auto; font-size:11.5px; color:#188038; text-decoration:none; }
.soc-mini-more:hover { text-decoration:underline; }
/* 原型另有 .soc-mini-av 的 cursor + hover/focus 描边，那是给「头像本身是链接」用的；
   当前头像只是图片、没有点击目标，搬过来会造出「看着能点其实不能点」的假交互，故不搬。 */

/* ---------- 空态 ---------- */
.soc-empty { display:block; }
.soc-ept { font-size:13px; color:#5b6b7a; margin:14px 0 4px; text-align:center; }
.soc-epx { font-size:11.5px; color:#9aa7b2; margin:0 0 10px; text-align:center; }
.soc-ebtn { display:block; width:fit-content; margin:0 auto 10px; font-size:12px; color:#188038; text-decoration:none; border:1px solid #c7e3d1; border-radius:4px; padding:4px 12px; background:none; cursor:pointer; }
.soc-ebtn:hover { background:#f2f8f4; }
/* 关注动态补位（原型 .soc-fallback「站内热帖」）：只在「有关注但最近没发帖」时出现 */
.soc-fallback { display:block; }
.soc-fbh { font-size:11px; color:#9aa7b2; margin:12px 0 4px; padding-top:10px; border-top:1px solid #eef2f6; }

/* ---------- 未登录静态卡（壳里直出，JS 渲染后被覆盖） ---------- */
.soc-guest { text-align:center; padding:26px 16px; background:#fff; border:1px solid #e3e8ee; border-radius:8px; }
/* 原型是 display:none 由 JS 打开；壳里这张必须默认可见，否则关 JS 空白 */
.soc-guest-static { display:block; }
.soc-guest-t { font-size:14px; font-weight:bold; color:#1f2d3d; }
.soc-guest-p { font-size:12px; color:#8a97a3; margin:6px 0 12px; }
.soc-guest-btn { display:inline-block; font-size:12.5px; color:#fff; background:#188038; border-radius:4px; padding:6px 16px; text-decoration:none; }

/* ---------- 兜底（JS 请求失败且 SSR 无内容时） ---------- */
.soc-fb-box { background:#fff; border:1px solid #e3e8ee; border-radius:8px; padding:26px 16px; text-align:center; }
.soc-fb-box .soc-fb-t { font-size:13px; color:#5b6b7a; }
.soc-fb-box .soc-fb-x { font-size:11.5px; color:#9aa7b2; margin:6px 0 12px; }

/* ---------- 响应式（照原型 :337 ~ :345 断点，一条不改） ---------- */
@media (max-width:1023px){
  /* 两列放不下 ⇒ 落单列（原型 :337） */
  .soc-cols { grid-template-columns:minmax(0,1fr); }
}
/* 推荐卡在单列全宽下，每行「头像+名字」与「+关注」之间会空出 500px（原型 768 实测），
   ⇒ 三人横排各占 1/3；每列仅 ~220px 放不下横排，改竖排卡片。≤600 回到默认（一行一人横排）。 */
@media (max-width:1023px) and (min-width:601px){
  .soc-ppl { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0 12px; }
  .soc-p { flex-direction:column; align-items:flex-start; gap:6px; border-bottom:0; padding:6px 2px 10px; }
  .soc-pinfo { width:100%; }
}
@media (max-width:720px){
  .soc-tiptxt { white-space:normal; }
  .soc-nums { gap:18px; }
  .soc-item { flex-wrap:wrap; row-gap:2px; }
}
