/* ============================================================
   forum 模板 — 论坛风格（参考土狗社区）
   顶栏白底 / 左侧板块导航 / 帖子列表 + 右侧社区侧栏 / 楼层回帖
   ============================================================ */
:root {
  --f-primary: #2f6fed;
  --f-accent: #f97316;
  --f-bg: #f4f6f9;
  --f-card: #ffffff;
  --f-text: #1f2733;
  --f-sub: #9aa4b2;
  --f-line: #e8ebf0;
  --f-radius: 12px;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--f-bg); color: var(--f-text);
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
a { color: inherit; }

/* ---------- 顶栏 ---------- */
.f-topbar { background: #fff; border-bottom: 1px solid var(--f-line); position: sticky; top: 0; z-index: 100; }
.f-topbar-inner { max-width: 1180px; margin: 0 auto; padding: 0 16px; height: 60px; display: flex; align-items: center; gap: 20px; }
.f-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; font-size: 17px; color: var(--f-text); flex-shrink: 0; }
.f-logo-mark { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, var(--f-primary), #6366f1); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
.f-search { flex: 1; max-width: 420px; display: flex; }
.f-search-input { flex: 1; height: 36px; border: 1.5px solid var(--f-line); border-right: 0; border-radius: 8px 0 0 8px; padding: 0 12px; font-size: 13px; outline: none; background: #f8fafc; }
.f-search-input:focus { border-color: var(--f-primary); background: #fff; }
.f-search-btn { width: 40px; height: 36px; border: 1.5px solid var(--f-line); border-left: 0; border-radius: 0 8px 8px 0; background: #f8fafc; color: var(--f-sub); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.f-topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.f-signin-btn { height: 34px; padding: 0 16px; border-radius: 8px; border: 0; background: var(--f-accent); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; }
.f-signin-btn:hover { opacity: .9; }
.f-signin-btn.signed { background: #e5e7eb; color: #6b7280; cursor: pointer; }
.f-user-chip { display: flex; align-items: center; gap: 7px; text-decoration: none; font-size: 13px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--f-line); }
.f-user-chip:hover { border-color: var(--f-primary); }
.f-user-pts { color: var(--f-sub); font-size: 11px; }
.f-top-link { color: var(--f-sub); text-decoration: none; font-size: 13px; }
.f-top-link-strong { color: var(--f-primary); font-weight: 600; }

/* ---------- 布局 ---------- */
.f-wrap { max-width: 1180px; margin: 0 auto; padding: 16px; }
.f-layout { display: grid; grid-template-columns: 150px minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
@media (max-width: 1080px) { .f-layout { grid-template-columns: minmax(0, 1fr) 280px; } .f-boardnav { grid-row: 2; grid-column: 1 / -1; flex-direction: row; overflow-x: auto; } }
@media (max-width: 760px) { .f-layout { grid-template-columns: 1fr; } .f-sidebar { order: 3; } }

/* ---------- 左侧板块导航 ---------- */
.f-boardnav { background: var(--f-card); border-radius: var(--f-radius); border: 1px solid var(--f-line); padding: 8px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 76px; }
.f-boardnav a { padding: 9px 12px; border-radius: 8px; text-decoration: none; color: #4b5563; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.f-boardnav a:hover { background: #f3f4f6; }
.f-boardnav a.on { background: #eef4ff; color: var(--f-primary); font-weight: 600; }
.f-boardnav .f-boardnav-cur { padding: 9px 12px; color: var(--f-sub); font-size: 13.5px; }
/* 横向变体（用户中心页头导航条） */
.f-boardnav.f-boardnav-h { flex-direction: row; overflow-x: auto; position: static; margin-bottom: 14px; padding: 6px; }
.f-boardnav.f-boardnav-h a { white-space: nowrap; }

/* ---------- Tabs ---------- */
.f-main { min-width: 0; }
.f-tabs { background: var(--f-card); border-radius: var(--f-radius) var(--f-radius) 0 0; border: 1px solid var(--f-line); border-bottom: 0; padding: 10px 16px 0; display: flex; gap: 4px; align-items: center; }
.f-tabs a { padding: 8px 14px; text-decoration: none; color: #6b7280; font-size: 14px; border-radius: 8px 8px 0 0; border-bottom: 2px solid transparent; }
.f-tabs a:hover { color: var(--f-text); }
.f-tabs a.on { color: var(--f-primary); font-weight: 600; border-bottom-color: var(--f-primary); }
.f-tabs-post { margin-left: auto; color: var(--f-accent) !important; font-weight: 600; }

/* ---------- 帖子列表 ---------- */
.f-list { background: var(--f-card); border: 1px solid var(--f-line); display: flex; flex-direction: column; }
.f-tabs + .f-list { border-top: 0; border-radius: 0 0 var(--f-radius) var(--f-radius); }
.f-list:not(.f-tabs + .f-list) { border-radius: var(--f-radius); }
.f-row { display: flex; align-items: flex-start; gap: 12px; padding: 13px 16px; border-bottom: 1px solid #f1f3f6; }
.f-row:last-child { border-bottom: 0; }
.f-row:hover { background: #fafbfc; }
.f-row-badge { flex-shrink: 0; width: 64px; }
.f-badge { display: inline-block; padding: 2px 8px; border-radius: 5px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.f-row-main { flex: 1; min-width: 0; }
.f-row-title { display: block; color: var(--f-text); font-weight: 600; font-size: 14.5px; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f-row-title:hover { color: var(--f-primary); }
.f-row-meta { display: flex; gap: 12px; margin-top: 4px; color: var(--f-sub); font-size: 12px; }
.f-row-author { color: #6b7280; }
.f-row-side { flex-shrink: 0; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.f-row-replies { display: inline-block; min-width: 26px; padding: 1px 7px; border-radius: 999px; background: #f3f4f6; color: #9ca3af; font-size: 12px; text-align: center; }
.f-row-replies.has { background: #eef4ff; color: var(--f-primary); font-weight: 600; }
.f-row-last { color: var(--f-sub); font-size: 11.5px; }

.f-empty-block { padding: 44px 16px; text-align: center; color: var(--f-sub); background: var(--f-card); border: 1px solid var(--f-line); border-radius: var(--f-radius); }

/* ---------- 板块头 ---------- */
.f-board-head { background: var(--f-card); border: 1px solid var(--f-line); border-radius: var(--f-radius); padding: 18px 20px; margin-bottom: 14px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.f-board-name { margin: 0; font-size: 18px; }
.f-board-desc { margin: 0; color: var(--f-sub); font-size: 13px; flex: 1; }
.f-tagrow { display: flex; gap: 8px; flex-wrap: wrap; }
.f-tag { padding: 2px 10px; border-radius: 999px; background: #f3f4f6; color: #6b7280; font-size: 12px; text-decoration: none; }
.f-tag:hover { background: #eef4ff; color: var(--f-primary); }
.f-tag.on { background: #eef4ff; color: var(--f-primary); font-weight: 600; }
.f-tagbar { background: var(--f-card); border: 1px solid var(--f-line); border-radius: var(--f-radius); padding: 11px 16px; margin-bottom: 12px; display: flex; gap: 10px; align-items: flex-start; }
.f-tagbar-label { font-size: 12.5px; color: var(--f-sub); flex-shrink: 0; line-height: 24px; }

/* ---------- 帖子详情 ---------- */
.f-topic-head { background: var(--f-card); border: 1px solid var(--f-line); border-radius: var(--f-radius); padding: 18px 20px; margin-bottom: 14px; }
.f-topic-title { margin: 0 0 8px; font-size: 20px; line-height: 1.4; }
.f-topic-meta { display: flex; gap: 14px; align-items: center; color: var(--f-sub); font-size: 12.5px; flex-wrap: wrap; }
.f-topic-actions { margin-top: 10px; display: flex; gap: 8px; }
.f-action-btn { height: 30px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--f-line); background: #fff; color: #6b7280; font-size: 12.5px; cursor: pointer; }
.f-action-btn:hover { border-color: var(--f-primary); color: var(--f-primary); }
.f-action-btn.faved { background: #eef4ff; border-color: var(--f-primary); color: var(--f-primary); }

/* 楼主帖：独立强调卡片（浅蓝底 + 品牌色左边条 + 红色楼主标） */
.f-floor-op { border-color: #c9d9f9; border-left: 3px solid var(--f-primary); background: linear-gradient(180deg, #f8fbff, #ffffff); margin-bottom: 14px; padding-top: 14px; }
.f-floor-name-op { font-size: 14.5px; }
.f-floor-content-op { font-size: 15px; line-height: 1.85; }
.f-ubadge-owner { background: #fee2e2; color: #dc2626; }
/* 楼主帖作者行下方的浏览/回帖/时间 */
.f-op-meta { display: flex; gap: 14px; margin-top: 2px; padding-left: 54px; color: var(--f-sub); font-size: 12px; }
/* 楼主帖卡片左下角（收藏 + 签名） */
.f-floor-ftleft { display: flex; align-items: center; gap: 12px; min-width: 0; }
.f-floor-ftleft .f-action-btn { height: 28px; padding: 0 12px; font-size: 12px; }

/* 回帖区：贴吧式两栏列表（左头像 + 右侧昵称/内容/操作列） */
.f-replies { background: var(--f-card); border: 1px solid var(--f-line); border-radius: var(--f-radius); margin-bottom: 12px; }
.f-replies-head { display: flex; justify-content: space-between; align-items: center; padding: 11px 18px; border-bottom: 1px solid var(--f-line); font-size: 13.5px; font-weight: 700; }
.f-replies-sub { font-size: 11.5px; color: var(--f-sub); font-weight: 400; }
.f-reply { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; padding: 14px 18px; border-bottom: 1px solid #f0f2f5; }
.f-reply:hover { background: #fafbfd; }
.f-reply:last-child { border-bottom: 0; border-radius: 0 0 var(--f-radius) var(--f-radius); }
.f-reply .uc-avatar { margin-top: 2px; }
.f-reply-main { min-width: 0; }
.f-reply-hd { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.f-reply-floorno { margin-left: auto; color: var(--f-sub); font-size: 12.5px; font-weight: 600; }
.f-reply-content { margin-top: 6px; font-size: 14px; line-height: 1.75; color: var(--f-text); word-break: break-word; overflow-wrap: anywhere; }
.f-reply-ft { margin-top: 8px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.f-reply-time { color: var(--f-sub); font-size: 11.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f-reply-ft .act-reply { background: none; border: 0; padding: 2px 10px; color: var(--f-primary); font-size: 12.5px; cursor: pointer; border-radius: 6px; }
.f-reply-ft .act-reply:hover { background: #eef4ff; }

/* 楼中楼（子回复嵌套在父楼层内） */
.f-subreplies { margin-top: 10px; background: #f7f9fc; border: 1px solid #eef1f5; border-radius: 8px; padding: 4px 12px; }
.f-subreply { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; padding: 8px 0; border-bottom: 1px dashed #e8ecf1; }
.f-subreply:last-child { border-bottom: 0; }
.f-subreply .uc-avatar { margin-top: 1px; }
.f-subreply-body { min-width: 0; }
.f-subreply-line { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.f-subreply-name { font-size: 12.5px; font-weight: 600; color: var(--f-primary); }
.f-subreply-to { font-size: 11.5px; color: var(--f-accent); }
.f-subreply-to-name { color: var(--f-accent); text-decoration: none; font-weight: 600; }
.f-subreply-to-name:hover { text-decoration: underline; }
.f-subreply-time { margin-left: auto; font-size: 11px; color: var(--f-sub); }
.f-subreply-content { font-size: 13px; line-height: 1.65; margin-top: 2px; word-break: break-word; overflow-wrap: anywhere; }
.f-subreply-acts { margin-top: 3px; }
.f-subreply-acts .act-reply { background: none; border: 0; padding: 0; color: var(--f-sub); font-size: 11.5px; cursor: pointer; }
.f-subreply-acts .act-reply:hover { color: var(--f-primary); }

/* 回复目标指示条（回复某楼时显示） */
.f-reply-target { display: flex; align-items: center; gap: 10px; background: #eef4ff; border: 1px solid #c9d9f9; color: var(--f-primary); border-radius: 8px; padding: 7px 12px; font-size: 12.5px; margin-bottom: 10px; }
.f-reply-target span { font-weight: 600; }
.f-reply-target button { margin-left: auto; background: none; border: 0; color: var(--f-sub); font-size: 12px; cursor: pointer; }
.f-reply-target button:hover { color: #dc2626; }

/* 楼层间「回复 N楼」标签 */
.f-ubadge-to { background: #fff7ed; color: #ea580c; }

/* ---------- 发卡表单：商品信息卡 ---------- */
.f-fieldcard { margin-top: 16px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fbfcfe; padding: 14px 16px; }
.f-fieldcard-title { font-size: 13px; font-weight: 700; color: #1f2733; margin-bottom: 10px; }
.f-fieldgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; }
@media (max-width: 640px) { .f-fieldgrid { grid-template-columns: 1fr; } }
.f-fielditem { display: flex; gap: 8px; font-size: 13px; line-height: 1.7; min-width: 0; }
.f-fieldlabel { color: #9aa4b2; flex: 0 0 76px; }
.f-fieldvalue { color: #1f2733; word-break: break-word; overflow-wrap: anywhere; }
.f-fieldvalue a { color: var(--f-primary); }
.f-fieldexpire { margin-top: 10px; padding-top: 9px; border-top: 1px dashed #e2e8f0; font-size: 12px; color: #9aa4b2; }
.f-fieldexpire.is-expired { color: #b91c1c; font-weight: 600; }

/* ---------- 主题红包（微信风红包封套） ---------- */
.f-rp { margin-top: 16px; width: 300px; max-width: 100%; }
.f-rp-card { position: relative; overflow: hidden; border-radius: 14px; padding: 32px 18px 24px; text-align: center;
  min-height: 378px; display: flex; flex-direction: column; align-items: center;
  background: linear-gradient(172deg, #e85b50 0%, #d2453a 48%, #c53a2f 100%); color: #fff;
  box-shadow: 0 16px 32px -16px rgba(170,45,36,.75); }
.f-rp-card.is-opened { min-height: 250px; background: linear-gradient(172deg, #dd554a 0%, #c03a30 100%); }
/* 底部弧形封盖（微信红包下半段的浅红色弧） */
.f-rp-flap { position: absolute; left: -32%; bottom: -36%; width: 164%; height: 58%; border-radius: 50%;
  background: #ee6f61; }
/* 居中大福字水印 */
.f-rp-fu { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); font-size: 148px; line-height: 1;
  font-weight: 700; color: rgba(255,255,255,.14); pointer-events: none; user-select: none; z-index: 1; }
.f-rp-ava { position: relative; z-index: 3; width: 48px; height: 48px; border-radius: 10px; background: #fff;
  padding: 3px; box-sizing: border-box; box-shadow: 0 2px 8px rgba(0,0,0,.20); }
.f-rp-ava img { width: 100%; height: 100%; border-radius: 7px; display: block; }
.f-rp-name { position: relative; z-index: 3; margin-top: 12px; font-size: 15px; font-weight: 700; text-shadow: 0 1px 2px rgba(0,0,0,.18); }
.f-rp-bless { position: relative; z-index: 3; margin-top: 7px; font-size: 16px; font-weight: 800; color: #ffe08a; letter-spacing: 2px; }
.f-rp-type { position: relative; z-index: 3; margin-top: 16px; padding: 4px 15px; border: 1px solid rgba(255,255,255,.62);
  border-radius: 999px; font-size: 12px; color: #fff; background: rgba(255,255,255,.10); }
.f-rp-body { position: relative; z-index: 3; margin-top: auto; padding-top: 26px; width: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 10px; }
.f-rp-open { width: 68px; height: 68px; border-radius: 50%; border: 3px solid rgba(255,255,255,.85); cursor: pointer;
  font-size: 21px; font-weight: 800; color: #a2470f; font-family: inherit;
  background: radial-gradient(circle at 35% 28%, #fff3c4, #f9c74f 58%, #eeab35); box-shadow: 0 8px 18px -6px rgba(0,0,0,.4);
  transition: transform .16s, box-shadow .16s; }
.f-rp-open:hover { transform: scale(1.07); box-shadow: 0 10px 22px -6px rgba(0,0,0,.45); }
.f-rp-open:active { transform: scale(.95); }
.f-rp-open:disabled { opacity: .65; cursor: default; transform: none; }
.f-rp-tip { font-size: 12.5px; color: rgba(255,255,255,.94); text-shadow: 0 1px 2px rgba(0,0,0,.12); }
.f-rp-got { font-size: 30px; font-weight: 800; color: #ffe08a; line-height: 1.1; text-shadow: 0 2px 6px rgba(0,0,0,.2); }
.f-rp-claims { margin-top: 10px; background: #fff; border: 1px solid var(--f-line); border-radius: 12px; padding: 12px 14px; }
.f-rp-sum { font-size: 12.5px; color: #6b7280; padding-bottom: 9px; border-bottom: 1px solid #f1f3f6; }
.f-rp-sum b { color: #c73a2e; }
/* 进行中且未领取：明细不公开 */
.f-rp-hidden { padding: 6px 0; text-align: center; font-size: 12.5px; color: #9aa4b2; }
.f-rp-list { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow-y: auto; }
.f-rp-row { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-bottom: 1px solid #f7f8fa; }
.f-rp-row:last-child { border-bottom: 0; }
.f-rp-row img { border-radius: 50%; flex: 0 0 auto; }
.f-rp-u { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.f-rp-u a { font-size: 13px; font-weight: 600; color: #1f2733; text-decoration: none; }
.f-rp-u a:hover { color: var(--f-primary); }
.f-rp-date { font-size: 11.5px; color: #9aa4b2; }
.f-rp-best { font-size: 10.5px; padding: 1px 6px; border-radius: 999px; background: #fff7e6; color: #b45309; font-weight: 700; }
.f-rp-amt { font-size: 13.5px; font-weight: 800; color: #c73a2e; white-space: nowrap; }
.f-rp-row.is-best .f-rp-amt { font-size: 14.5px; }
@keyframes f-rp-pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
.f-rp-opening .f-rp-got { animation: f-rp-pop .5s ease-out; }
/* 红包徽章：按「自己发的 / 已领取 / 已领完 / 可领取」区分图标与配色 */
.f-badge-rp { background: #fee2e2; color: #c73a2e; font-weight: 700; }
.f-badge-rp.is-got { background: #ecfdf5; color: #059669; }
.f-badge-rp.is-mine { background: #fff7e6; color: #b45309; }
.f-badge-rp.is-done { background: #f1f5f9; color: #94a3b8; font-weight: 600; }
/* 列表标题行：标题 + 红包徽章并排 */
.f-row-titleline { display: flex; align-items: center; gap: 7px; min-width: 0; }
.f-row-titleline .f-row-title { flex: 1; min-width: 0; }

.f-floor { background: var(--f-card); border: 1px solid var(--f-line); border-radius: var(--f-radius); margin-bottom: 10px; padding: 14px 18px 12px; }
.f-floor-hd { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.f-floor-who { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.f-floor-name { font-size: 13.5px; font-weight: 700; word-break: break-all; }
.f-ubadge { display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.f-ubadge-uid { background: #374151; color: #fff; }
.f-ubadge-lv { background: #fff7ed; color: #ea580c; }
.f-ubadge-mod { background: #fee2e2; color: #b91c1c; }
.f-ubadge-member { background: #eef4ff; color: #2f6fed; }
.f-ubadge-owner { background: #ecfdf5; color: #059669; }
.f-floor-hd-time { margin-left: auto; color: var(--f-sub); font-size: 12px; }
.f-floor-content { margin-top: 10px; font-size: 14.5px; line-height: 1.8; word-break: break-word; overflow-wrap: anywhere; }
.f-floor-content img { max-width: 100%; height: auto; border-radius: 8px; }
.f-floor-content table { border-collapse: collapse; max-width: 100%; display: block; overflow-x: auto; }
.f-floor-content table th, .f-floor-content table td { border: 1px solid var(--f-line); padding: 6px 10px; }
.f-floor-ft { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; padding-top: 9px; border-top: 1px dashed var(--f-line); flex-wrap: wrap; }
.f-floor-sig2 { color: #059669; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.f-floor-acts { margin-left: auto; display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.f-floor-acts .act-reply { background: none; border: 0; padding: 0; color: #6b7280; font-size: 12.5px; cursor: pointer; }
.f-floor-acts .act-reply:hover { color: var(--f-primary); }
.f-floor-no2 { color: var(--f-sub); font-size: 12px; font-weight: 700; }

/* 面包屑 */
.f-crumb { display: flex; align-items: center; gap: 8px; color: var(--f-sub); font-size: 12.5px; margin-bottom: 10px; }
.f-crumb a { color: var(--f-primary); text-decoration: none; }
.f-crumb a:hover { text-decoration: underline; }
.f-crumb i { font-style: normal; color: #cbd2dc; }

/* ---------- 分页 ---------- */
.f-pager { display: flex; gap: 8px; justify-content: center; margin: 16px 0; flex-wrap: wrap; }
.f-pager a, .f-pager span { min-width: 34px; height: 34px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid var(--f-line); background: #fff; color: #4b5563; font-size: 13px; text-decoration: none; }
.f-pager a:hover { border-color: var(--f-primary); color: var(--f-primary); }
.f-pager span.on { background: var(--f-primary); border-color: var(--f-primary); color: #fff; }
.f-pager-end { text-align: center; color: var(--f-sub); font-size: 12px; margin: 16px 0; }

/* ---------- 回帖框 ---------- */
.f-replybox { background: var(--f-card); border: 1px solid var(--f-line); border-radius: var(--f-radius); padding: 16px 18px; margin-top: 16px; }
.f-replybox-head { font-weight: 700; margin-bottom: 10px; }
.f-reply-textarea { width: 100%; border: 1.5px solid var(--f-line); border-radius: 8px; padding: 10px 12px; font-size: 14px; font-family: inherit; line-height: 1.6; resize: vertical; outline: none; }
.f-reply-textarea:focus { border-color: var(--f-primary); }
.f-replybox-foot { margin-top: 10px; display: flex; justify-content: flex-end; }
.f-replybox-guest { text-align: center; color: var(--f-sub); }
.f-replybox-guest a { color: var(--f-primary); text-decoration: none; font-weight: 600; }

.f-topic-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.f-topic-nav a { color: #6b7280; font-size: 12.5px; text-decoration: none; }
.f-topic-nav a:hover { color: var(--f-primary); }

/* ---------- 右侧栏 ---------- */
.f-sidebar { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.f-widget { background: var(--f-card); border: 1px solid var(--f-line); border-radius: var(--f-radius); padding: 16px 18px; }
.f-widget-title { font-size: 13.5px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; }
.f-usercard-top { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.f-usercard-idbox { display: flex; flex-direction: column; min-width: 0; }
.f-usercard-name { display: block; font-weight: 700; font-size: 14.5px; color: #1f2733; }
.f-usercard-top:hover .f-usercard-name { color: #2f6fed; }
.f-usercard-sub { display: block; font-size: 12px; color: var(--f-accent); }
.f-usercard-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; margin-top: 12px; }
.f-usercard-nav a { padding: 7px 10px; border-radius: 7px; color: #4b5563; text-decoration: none; font-size: 13px; }
.f-usercard-nav a:hover { background: #f3f4f6; }
.f-guest-title { font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.f-guest-desc { color: var(--f-sub); font-size: 12.5px; margin: 0 0 12px; }
.f-domain { font-size: 14px; font-weight: 600; color: var(--f-primary); word-break: break-all; }
.f-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; text-align: center; }
.f-stat b { display: block; font-size: 17px; }
.f-stat span { font-size: 11.5px; color: var(--f-sub); }
.f-toplist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.f-toplist li { display: flex; align-items: center; gap: 8px; }
.f-rank { width: 18px; height: 18px; border-radius: 4px; background: #f3f4f6; color: #9ca3af; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.f-rank.r1 { background: #fbbf24; color: #fff; }
.f-rank.r2 { background: #94a3b8; color: #fff; }
.f-rank.r3 { background: #f97316; color: #fff; }
.f-topname { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f-toppts { margin-left: auto; font-size: 11px; color: var(--f-sub); white-space: nowrap; }
.f-newusers { display: flex; flex-wrap: wrap; gap: 8px; }
.f-online { font-weight: 600; color: #059669; font-size: 12.5px; }
.f-online-bar { height: 6px; background: #f3f4f6; border-radius: 3px; overflow: hidden; }
.f-online-bar i { display: block; height: 100%; background: linear-gradient(90deg, #10b981, #34d399); border-radius: 3px; }
.f-links { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.f-links a { color: #6b7280; font-size: 12.5px; text-decoration: none; }
.f-links a:hover { color: var(--f-primary); }
.f-empty { color: var(--f-sub); font-size: 12px; }

/* ---------- 公告 / 维护提示 ---------- */
.f-notice { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: var(--f-radius); padding: 11px 16px; margin-bottom: 12px; font-size: 13px; line-height: 1.6; }
.f-maintenance { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; border-radius: var(--f-radius); padding: 11px 16px; margin-bottom: 12px; font-size: 13px; }
.f-maintenance-top { margin: 0 0 12px; }

/* ---------- 按钮 ---------- */
.f-btn-accent { display: inline-flex; align-items: center; justify-content: center; height: 34px; padding: 0 18px; border-radius: 8px; border: 0; background: var(--f-accent); color: #fff; font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer; }
.f-btn-accent:hover { opacity: .9; }
.f-btn-ghost { display: inline-flex; align-items: center; justify-content: center; height: 34px; padding: 0 18px; border-radius: 8px; border: 1px solid var(--f-line); background: #fff; color: #4b5563; font-size: 13px; text-decoration: none; cursor: pointer; }
.f-btn-block { width: 100%; margin-top: 8px; }

/* ---------- 底部 ---------- */
.f-footer { border-top: 1px solid var(--f-line); background: #fff; margin-top: 24px; }
.f-footer-inner { max-width: 1180px; margin: 0 auto; padding: 18px 16px; display: flex; justify-content: space-between; gap: 10px; color: var(--f-sub); font-size: 12.5px; flex-wrap: wrap; }
.f-footer a { color: var(--f-sub); text-decoration: none; }
.f-footer a:hover { color: var(--f-primary); }

/* 顶栏消息中心入口 + 未读角标 */
.f-msg-chip { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; color: var(--f-sub); text-decoration: none; }
.f-msg-chip:hover { background: #f3f4f6; color: var(--f-primary); }
.f-msg-badge { position: absolute; top: -3px; right: -3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: #dc2626; color: #fff; font-size: 10.5px; line-height: 16px; text-align: center; font-weight: 700; }

/* 作者名可点击（名片入口） */
.f-row-author { color: #6b7280; text-decoration: none; }
a.f-row-author:hover { color: var(--f-primary); }
.f-row-last a { color: #6b7280; text-decoration: none; }
.f-row-last a:hover { color: var(--f-primary); }

/* 楼层作者名 / 楼中楼作者名 可点击 */
a.f-floor-name, a.f-subreply-name { color: inherit; text-decoration: none; }
a.f-floor-name:hover, a.f-subreply-name:hover { color: var(--f-primary); }

/* 侧栏富豪榜 / 最新用户 可点击 */
a.f-topname { color: #1f2733; text-decoration: none; }
a.f-topname:hover { color: var(--f-primary); }
a.f-newuser { display: inline-flex; }
