/* ===== 社区模块样式（小红书风格，主色 #ff6b9d） ===== */
.community-main { padding: 12px 0 80px; background: #f6f6f6; min-height: 70vh; }
.post-main { padding: 0 0 90px; background: #fff; }

/* Tabs */
.community-tabs {
    display: flex; gap: 28px; justify-content: center;
    padding: 6px 0 14px; position: sticky; top: 0; z-index: 20;
    background: #f6f6f6;
}
.community-tab {
    font-size: 16px; color: #888; cursor: pointer; padding: 4px 2px;
    position: relative; transition: color .2s;
}
.community-tab.active { color: #222; font-weight: 700; }
.community-tab.active::after {
    content: ''; position: absolute; left: 50%; bottom: -4px; transform: translateX(-50%);
    width: 20px; height: 3px; border-radius: 2px; background: #ff6b9d;
}

/* 瀑布流（两列） */
.waterfall { column-count: 2; column-gap: 10px; }
@media (min-width: 720px) { .waterfall { column-count: 3; } }
@media (min-width: 1000px) { .waterfall { column-count: 4; } }

.wf-card {
    position: relative;
    display: inline-block; width: 100%; margin-bottom: 10px; break-inside: avoid;
    background: #fff; border-radius: 10px; overflow: hidden; text-decoration: none; color: inherit;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
/* stretched-link：绝对定位覆盖整张卡片，点击空白区域跳转帖子详情；
   作者链接 .wf-user 用 position:relative;z-index:1 浮在上方，保留独立点击 */
.wf-card-link { position: absolute; inset: 0; z-index: 0; }
.wf-cover { width: 100%; background: #f0f0f0; }
.wf-cover img { width: 100%; display: block; }
.wf-body { padding: 8px 10px 10px; }
.wf-title { font-size: 14px; line-height: 1.4; color: #222; margin-bottom: 8px;
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wf-meta { display: flex; align-items: center; justify-content: space-between; }
.wf-user { position: relative; z-index: 1; display: flex; align-items: center; gap: 5px; min-width: 0; cursor: pointer; text-decoration: none; color: inherit; }
.wf-avatar { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.wf-avatar-default { display: inline-flex; align-items: center; justify-content: center;
    background: #ffd6e5; color: #ff6b9d; font-size: 11px; font-weight: 700; }
.wf-uname { font-size: 12px; color: #999; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf-like { font-size: 12px; color: #999; flex-shrink: 0; }

.community-loading, .community-empty { text-align: center; color: #999; padding: 20px; font-size: 14px; }
.community-empty { padding: 60px 20px; }
.community-empty .btn-primary { display: inline-block; margin-top: 14px; }

/* ===== 用户主页头部 ===== */
.cu-header { display: flex; flex-direction: column; align-items: center; padding: 20px 16px 8px; }
.cu-avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.cu-avatar.pa-avatar-default { font-size: 30px; }
.cu-name { font-size: 18px; font-weight: 700; color: #222; margin: 10px 0 0; }
.cu-account-wrap { margin-top: 6px; }
.cu-follow { margin-top: 12px; border: 1px solid #ff6b9d; color: #fff; background: linear-gradient(135deg,#ff6b9d,#ff8ab0);
    padding: 6px 26px; border-radius: 18px; font-size: 14px; cursor: pointer; transition: all .2s; }
.cu-follow.followed { border-color: #ddd; color: #999; background: #f5f5f5; }
.cu-msg { margin-top: 8px; border: 1px solid #ddd; color: #666; background: #fff;
    padding: 6px 26px; border-radius: 18px; font-size: 14px; cursor: pointer; transition: all .2s; }
.cu-msg:hover { border-color: #ff6b9d; color: #ff6b9d; }
.cu-stats { display: flex; gap: 36px; margin-top: 16px; }
.cu-stat { display: flex; flex-direction: column; align-items: center; cursor: pointer; }
.cu-stat-num { font-size: 17px; font-weight: 700; color: #222; }
.cu-stat-label { font-size: 12px; color: #999; margin-top: 2px; }
.cu-tabs { margin-top: 6px; }
.fu-link { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; cursor: pointer; }

/* 发布悬浮按钮 */
.community-fab {
    position: fixed; right: 20px; bottom: 30px; z-index: 50;
    width: 54px; height: 54px; border-radius: 50%;
    background: linear-gradient(135deg, #ff6b9d, #ff8ab0);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 14px rgba(255,107,157,.5);
}

/* ===== 帖子详情 ===== */
.post-container { max-width: 720px; }
.post-status-tip { background: #fff7e6; color: #d48806; font-size: 13px; padding: 8px 12px; border-radius: 6px; margin: 10px 0; }

.post-author-bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 0 10px; }
.pa-left { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.pa-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.pa-avatar-default { display: inline-flex; align-items: center; justify-content: center;
    background: #ffd6e5; color: #ff6b9d; font-weight: 700; font-size: 16px; }
.pa-name { font-size: 15px; font-weight: 600; color: #222; }
.pa-follow {
    border: 1px solid #ff6b9d; color: #ff6b9d; background: #fff;
    padding: 5px 16px; border-radius: 16px; font-size: 13px; cursor: pointer;
}
.pa-follow.followed { border-color: #ddd; color: #999; background: #f5f5f5; }

.post-gallery { position: relative; margin: 6px 0 4px; border-radius: 10px; overflow: hidden; background: #f6f6f6; }
.pg-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.pg-track::-webkit-scrollbar { display: none; }
.pg-track.dragging { scroll-snap-type: none; scroll-behavior: auto; cursor: grabbing; }
.pg-slide { flex: 0 0 100%; width: 100%; scroll-snap-align: start; }
.pg-slide img { width: 100%; display: block; -webkit-user-drag: none; user-select: none; }
.post-gallery.multi .pg-slide img { height: 100%; object-fit: cover; }
.pg-counter { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,0.5); color: #fff;
    font-size: 12px; line-height: 1; padding: 4px 10px; border-radius: 12px; pointer-events: none; z-index: 2; }
.pg-dots { position: absolute; left: 0; right: 0; bottom: 8px; display: flex; justify-content: center; gap: 6px; pointer-events: none; z-index: 2; }
.pg-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.6); transition: width .2s, background .2s; pointer-events: auto; cursor: pointer; }
.pg-dot.active { width: 16px; border-radius: 3px; background: #fff; }
.pg-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; padding: 0;
    border: none; border-radius: 50%; background: rgba(0,0,0,0.4); color: #fff; font-size: 22px; line-height: 36px;
    text-align: center; cursor: pointer; z-index: 3; opacity: 0; transition: opacity .2s; display: none; }
.pg-nav.pg-prev { left: 10px; }
.pg-nav.pg-next { right: 10px; }
.pg-nav.hidden { visibility: hidden; }
/* 触屏靠滑动，桌面(精确指针+可hover)显示左右箭头，鼠标悬停时浮现 */
@media (hover: hover) and (pointer: fine) {
    .post-gallery.multi .pg-nav { display: block; }
    .post-gallery.multi:hover .pg-nav { opacity: 1; }
    .post-gallery.multi:hover .pg-nav.hidden { opacity: 0; }
    .post-gallery.multi .pg-track { cursor: grab; }
}

.post-title { font-size: 20px; font-weight: 700; color: #222; margin: 12px 0 8px; line-height: 1.4; }
.post-content { font-size: 15px; color: #333; line-height: 1.7; white-space: normal; word-break: break-word; }

.post-products { margin: 18px 0; }
.pp-title { font-size: 14px; color: #888; margin-bottom: 8px; }
.pp-card { display: flex; align-items: center; gap: 10px; background: #f8f8f8; border-radius: 10px;
    padding: 8px; text-decoration: none; color: inherit; margin-bottom: 8px; }
.pp-img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.pp-info { flex: 1; min-width: 0; }
.pp-name { font-size: 14px; color: #222; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-price { font-size: 15px; color: #ff6b9d; font-weight: 700; margin-top: 4px; }
.pp-go { font-size: 12px; color: #fff; background: #ff6b9d; padding: 5px 12px; border-radius: 14px; flex-shrink: 0; }

.post-time { font-size: 12px; color: #bbb; margin: 16px 0; }

/* 评论区 */
.post-comments { border-top: 1px solid #f0f0f0; padding-top: 14px; }
.pc-head { font-size: 15px; font-weight: 600; color: #222; margin-bottom: 12px; }
.cm-item { display: flex; gap: 10px; margin-bottom: 16px; }
.cm-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.cm-main { flex: 1; min-width: 0; }
.cm-name { font-size: 13px; color: #999; margin-bottom: 3px; display: inline-block; vertical-align: middle; }
.cm-tags { margin-bottom: 3px; }
.cmt-tag { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 4px; margin-right: 6px; line-height: 1.4; vertical-align: middle; }
.cmt-tag-pending { background: #fff7e6; color: #d48806; border: 1px solid #ffd591; }
.cmt-tag-reject { background: #fff1f0; color: #cf1322; border: 1px solid #ffa39e; }
.cm-text { font-size: 15px; color: #222; line-height: 1.5; word-break: break-word; }
.cm-op { margin-top: 4px; }
.cm-reply-btn { font-size: 12px; color: #999; cursor: pointer; }
.cm-replies { margin-top: 8px; background: #f8f8f8; border-radius: 8px; padding: 8px 10px; }
.cm-reply { font-size: 14px; line-height: 1.6; color: #333; }
.cm-reply + .cm-reply { margin-top: 4px; }
.cm-rto { color: #999; font-weight: 400; }
.cm-reply .cm-reply-btn { margin-left: 6px; }
.cm-ravatar { width: 18px; height: 18px; border-radius: 50%; vertical-align: middle; margin-right: 4px; object-fit: cover; display: inline-block; }
.cm-ravatar.pa-avatar-default { display: inline-flex; font-size: 10px; line-height: 1; overflow: hidden; }
.cm-rname { color: #666; font-weight: 600; }
.cm-uclick { cursor: pointer; }
.pc-more { text-align: center; color: #ff6b9d; font-size: 13px; padding: 8px; cursor: pointer; }
.pc-empty { text-align: center; color: #bbb; font-size: 14px; padding: 20px; }

/* 底部操作栏 */
.post-actionbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: flex; align-items: center; gap: 12px; padding: 8px 14px;
    background: #fff; border-top: 1px solid #eee;
}
.pab-input {
    flex: 1; background: #f2f3f5; border-radius: 18px; padding: 9px 16px;
    color: #999; font-size: 14px; cursor: pointer;
}
.pab-btn { display: flex; flex-direction: column; align-items: center; font-size: 11px; color: #666; cursor: pointer; min-width: 34px; }
.pab-ico { font-size: 20px; line-height: 1; margin-bottom: 2px; color: #666; }
.pab-ico.active { color: #ff6b9d; }
#likeBtn[data-liked="1"] .pab-ico, #favBtn[data-fav="1"] .pab-ico { color: #ff6b9d; }

/* 评论输入弹窗 */
.comment-modal { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.4); display: none; align-items: flex-end; }
.comment-modal.show { display: flex; }
.cm-box { width: 100%; background: #fff; border-radius: 14px 14px 0 0; padding: 16px; }
.cm-box textarea { width: 100%; height: 90px; border: 1px solid #eee; border-radius: 10px; padding: 10px; font-size: 15px; resize: none; box-sizing: border-box; }
.cm-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }

/* ===== 发布页 ===== */
.publish-main { background: #f8f8f9; min-height: 100vh; padding-bottom: 40px; }
.publish-container { max-width: 680px; margin: 0 auto; background: #fff; border-radius: 16px; padding: 24px; box-shadow: 0 2px 12px rgba(0,0,0,0.04); }
.publish-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.publish-h1 { font-size: 22px; font-weight: 700; color: #222; margin: 0; }
.publish-back { font-size: 20px; color: #666; cursor: pointer; padding: 8px; }
.publish-back:hover { color: #ff6b9d; }

.publish-uploads { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.pu-item, .pu-add {
    width: 100px; height: 100px; border-radius: 10px; position: relative;
    background: #fafafa; display: flex; align-items: center; justify-content: center;
}
.pu-item { overflow: hidden; }
.pu-item img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.pu-add { border: 2px dashed #e0e0e0; flex-direction: column; cursor: pointer; color: #999; }
.pu-plus { font-size: 30px; line-height: 1; color: #bbb; }
.pu-tip { font-size: 12px; margin-top: 4px; }
.pu-uploading { color: #999; font-size: 13px; position: relative; }
.pu-del { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%;
    background: rgba(0,0,0,0.6); color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 16px; cursor: pointer; transition: all 0.2s; }
.pu-del:hover { background: rgba(255,107,157,0.9); }

.publish-form-group { margin-bottom: 20px; }
.publish-title-label { font-size: 14px; color: #666; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.publish-title-label .required { color: #ff6b9d; font-size: 16px; }
.publish-title { width: 100%; border: 1px solid #e8e8e8; border-radius: 12px; padding: 14px 16px; font-size: 16px; font-weight: 500; box-sizing: border-box; outline: none; transition: all 0.2s; background: #fafafa; }
.publish-title:focus { border-color: #ff6b9d; background: #fff; box-shadow: 0 0 0 3px rgba(255,107,157,0.08); }
.publish-title::placeholder { color: #bbb; }

.publish-content-label { font-size: 14px; color: #666; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.publish-content { width: 100%; min-height: 160px; border: 1px solid #e8e8e8; border-radius: 12px; padding: 14px 16px; font-size: 15px; line-height: 1.7; box-sizing: border-box; outline: none; resize: none; transition: all 0.2s; background: #fafafa; }
.publish-content:focus { border-color: #ff6b9d; background: #fff; box-shadow: 0 0 0 3px rgba(255,107,157,0.08); }
.publish-content::placeholder { color: #bbb; }

.publish-products { background: #fafafa; border-radius: 14px; padding: 16px; margin-bottom: 20px; }
.pp-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.pp-row > span { font-size: 15px; font-weight: 600; color: #333; }
.pp-row .btn-secondary { background: #fff; border: 1px solid #ff6b9d; color: #ff6b9d; padding: 6px 16px; border-radius: 20px; font-size: 13px; cursor: pointer; transition: all 0.2s; }
.pp-row .btn-secondary:hover { background: #ff6b9d; color: #fff; }
.picked-products { display: flex; flex-wrap: wrap; gap: 8px; }
.picked-chip { background: linear-gradient(135deg, #fff0f5, #ffe6ef); color: #ff6b9d; font-size: 13px; padding: 6px 12px; border-radius: 16px; display: flex; align-items: center; gap: 4px; border: 1px solid #ffd6e5; }
.picked-chip b { cursor: pointer; font-size: 16px; line-height: 1; font-weight: 400; opacity: 0.7; }
.picked-chip b:hover { opacity: 1; }

.idol-select-box { margin-top: 4px; }
.idol-select { appearance: none; -webkit-appearance: none; min-width: 200px; max-width: 100%; background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="6" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" stroke="%23ff6b9d" stroke-width="1.5" fill="none" stroke-linecap="round"/></svg>') no-repeat right 14px center; border: 1px solid #ffd6e5; color: #ff6b9d; padding: 8px 36px 8px 16px; border-radius: 20px; font-size: 13px; cursor: pointer; outline: none; transition: border-color 0.2s; }
.idol-select:focus { border-color: #ff6b9d; }

.publish-submit { width: 100%; margin-top: 8px; padding: 15px; font-size: 16px; font-weight: 600; border-radius: 14px; background: linear-gradient(135deg, #ff6b9d, #ff8a80); color: #fff; border: none; cursor: pointer; transition: all 0.3s; box-shadow: 0 4px 14px rgba(255,107,157,0.4); }
.publish-submit:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255,107,157,0.5); }
.publish-submit:active { transform: translateY(0); }
.publish-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }

.publish-tip { text-align: center; font-size: 12px; color: #bbb; margin-top: 16px; }

@media (max-width: 768px) {
    .publish-container { margin: 12px; padding: 20px; border-radius: 12px; }
    .pu-item, .pu-add {
        width: calc((100% - 36px) / 4); padding-bottom: calc((100% - 36px) / 4);
    }
    .publish-h1 { font-size: 20px; }
}

/* 选择商品弹窗 */
.product-modal { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.4); display: none; align-items: flex-end; }
.product-modal.show { display: flex; }
.pm-box { width: 100%; max-height: 80vh; background: #fff; border-radius: 14px 14px 0 0; display: flex; flex-direction: column; }
.pm-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; font-size: 16px; font-weight: 600; border-bottom: 1px solid #f0f0f0; }
.pm-close { font-size: 24px; color: #999; cursor: pointer; line-height: 1; }
.pm-search { padding: 10px 16px; }
.pm-search input { width: 100%; border: 1px solid #eee; border-radius: 18px; padding: 8px 14px; font-size: 14px; box-sizing: border-box; outline: none; }
.pm-list { flex: 1; overflow-y: auto; padding: 0 16px; }
.pm-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f5f5f5; }
.pm-item img { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; }
.pm-info { flex: 1; min-width: 0; }
.pm-name { font-size: 14px; color: #222; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-price { font-size: 13px; color: #ff6b9d; margin-top: 3px; }
.pm-item input[type=checkbox] { width: 18px; height: 18px; }
.pm-foot { padding: 12px 16px; border-top: 1px solid #f0f0f0; }
.pm-foot .btn-primary { width: 100%; }

@media (min-width: 720px) {
    .comment-modal, .product-modal { align-items: center; }
    .cm-box, .pm-box { max-width: 520px; margin: 0 auto; border-radius: 14px; }
    .post-actionbar { max-width: 720px; left: 50%; transform: translateX(-50%); border-radius: 12px 12px 0 0; }
}

/* ===== 个人中心 - 社区列表（收藏/点赞） ===== */
.uc-waterfall { column-count: 2; column-gap: 10px; }
@media (min-width: 1100px) { .uc-waterfall { column-count: 3; } }

/* ===== 个人中心 - 关注/粉丝用户列表 ===== */
.fu-list { display: flex; flex-direction: column; }
.fu-item { display: flex; align-items: center; gap: 12px; padding: 14px 4px; border-bottom: 1px solid #f2f2f2; }
.fu-item:last-child { border-bottom: none; }
.fu-avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.fu-avatar-default { display: inline-flex; align-items: center; justify-content: center;
    background: #ffd6e5; color: #ff6b9d; font-size: 18px; font-weight: 700; }
.fu-info { flex: 1; min-width: 0; }
.fu-name { font-size: 15px; font-weight: 600; color: #222; }
.fu-meta { font-size: 12px; color: #999; margin-top: 3px; }
.fu-btn { flex-shrink: 0; border: 1px solid #ff6b9d; color: #ff6b9d; background: #fff;
    padding: 6px 16px; border-radius: 16px; font-size: 13px; cursor: pointer; transition: all .2s; }
.fu-btn.followed { border-color: #ddd; color: #999; background: #f5f5f5; }
.fu-btn.self { border-color: #eee; color: #bbb; background: #fafafa; cursor: default; }

/* ===== 个人中心 - 消息通知 ===== */
.notif-list { display: flex; flex-direction: column; }
.notif-item { display: flex; gap: 12px; padding: 14px 4px; border-bottom: 1px solid #f2f2f2; align-items: flex-start; }
.notif-item:last-child { border-bottom: none; }
.notif-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.notif-avatar-default { display: inline-flex; align-items: center; justify-content: center;
    background: #ffd6e5; color: #ff6b9d; font-size: 16px; font-weight: 700; }
.notif-body { flex: 1; min-width: 0; }
.notif-line { font-size: 14px; color: #222; line-height: 1.5; }
.notif-line .notif-uname { font-weight: 600; }
.notif-line .notif-act { color: #666; }
.notif-content { font-size: 13px; color: #555; margin-top: 4px; background: #f7f7f7; border-radius: 8px; padding: 6px 10px; word-break: break-word; }
.notif-post { display: block; font-size: 13px; color: #ff6b9d; margin-top: 6px; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-time { font-size: 12px; color: #bbb; margin-top: 6px; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: #ff6b9d; flex-shrink: 0; margin-top: 8px; }
.notif-dot.read { background: transparent; }

/* ===== 富文本编辑器（发帖页） ===== */
.rt-toolbar {
    display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
    padding: 8px 10px; border: 1px solid #e8e8e8; border-bottom: none;
    border-radius: 12px 12px 0 0; background: #fafafa;
}
.rt-btn {
    min-width: 36px; height: 36px; padding: 0 8px; border: none; background: #fff;
    border-radius: 8px; cursor: pointer; font-size: 15px; color: #555;
    display: inline-flex; align-items: center; justify-content: center;
    transition: all 0.15s; line-height: 1;
}
.rt-btn:hover { background: #ffe6ef; color: #ff6b9d; }
.rt-btn:active { background: #ffd6e5; }
.rt-sep { width: 1px; height: 22px; background: #e0e0e0; margin: 0 4px; }
.rt-color-btn { position: relative; width: 36px; height: 36px; border-radius: 8px; background: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.rt-color-btn:hover { background: #ffe6ef; }
.rt-color-icon { font-size: 16px; font-weight: 700; pointer-events: none; }

.publish-content-rich {
    width: 100%; min-height: 200px; max-height: 600px; overflow-y: auto;
    border: 1px solid #e8e8e8; border-radius: 0 0 12px 12px;
    padding: 14px 16px; font-size: 15px; line-height: 1.8; box-sizing: border-box;
    outline: none; resize: vertical; transition: all 0.2s; background: #fafafa;
    word-break: break-word;
}
.publish-content-rich:focus { border-color: #ff6b9d; background: #fff; box-shadow: 0 0 0 3px rgba(255,107,157,0.08); }
/* placeholder */
.publish-content-rich.rt-empty::before {
    content: attr(data-placeholder); color: #bbb; pointer-events: none;
}
/* 编辑器内的内联图片/视频 */
.publish-content-rich img.rt-inline-img {
    max-width: 100%; height: auto; border-radius: 8px; margin: 6px 0; display: block;
}
.publish-content-rich video.rt-inline-video {
    max-width: 100%; border-radius: 8px; margin: 6px 0; display: block; background: #000;
}
.publish-content-rich p { margin: 0 0 8px; }
.publish-content-rich .rt-uploading {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 24px; margin: 6px 0; background: #f5f5f5; border-radius: 8px; color: #999;
}
.rt-uploading-spin {
    width: 30px; height: 30px; border-radius: 50%;
    border: 3px solid #eee; border-top-color: #ff6b9d;
    animation: rt-spin 0.8s linear infinite; margin-bottom: 6px;
}
.rt-uploading-text { font-size: 12px; color: #888; }
@keyframes rt-spin { to { transform: rotate(360deg); } }

/* ===== 帖子详情页富文本内容渲染 ===== */
.post-content-rich { font-size: 15px; line-height: 1.8; color: #333; word-break: break-word; }
.post-content-rich p { margin: 0 0 10px; }
.post-content-rich img { max-width: 100%; height: auto; border-radius: 8px; margin: 8px 0; display: block; }
.post-content-rich video { max-width: 100%; border-radius: 8px; margin: 8px 0; display: block; background: #000; }
.post-content-rich strong, .post-content-rich b { font-weight: 700; }
.post-content-rich blockquote { border-left: 3px solid #ff6b9d; padding-left: 12px; margin: 10px 0; color: #666; }

/* ===== @提及高亮（发帖编辑器 + 帖子详情 + 评论纯文本） ===== */
.publish-content-rich a.mention,
.post-content-rich a.mention,
.at-mention { color: #ff6b9d; font-weight: 600; text-decoration: none; background: rgba(255,107,157,0.10); padding: 0 5px; border-radius: 4px; cursor: pointer; }
.publish-content-rich a.mention:hover,
.post-content-rich a.mention:hover,
.at-mention:hover { background: rgba(255,107,157,0.20); }
.cm-text .at-mention, .cm-rtext .at-mention { font-size: inherit; }

/* ===== @用户搜索弹窗（发帖页富文本） ===== */
.mention-modal { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.4); display: none; align-items: flex-end; justify-content: center; }
.mention-modal.show { display: flex; }
.mm-box { width: 100%; max-height: 70vh; background: #fff; border-radius: 14px 14px 0 0; display: flex; flex-direction: column; }
.mm-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; font-size: 16px; font-weight: 600; border-bottom: 1px solid #f0f0f0; }
.mm-close { font-size: 22px; color: #999; cursor: pointer; line-height: 1; }
.mm-search { padding: 10px 16px; border-bottom: 1px solid #f5f5f5; }
.mm-search input { width: 100%; border: 1px solid #eee; border-radius: 10px; padding: 10px 12px; font-size: 15px; box-sizing: border-box; outline: none; }
.mm-search input:focus { border-color: #ff6b9d; }
.mm-list { flex: 1; overflow-y: auto; padding: 4px 0; }
.mm-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; cursor: pointer; transition: background 0.15s; }
.mm-item:hover, .mm-item.active { background: #fff5f7; }
.mm-avatar { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.mm-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mm-avatar-default { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg,#ffd0e0,#ffe6ef); color: #ff6b9d; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 16px; }
.mm-name { font-size: 15px; color: #333; }
.mm-tip { padding: 24px 16px; text-align: center; color: #bbb; font-size: 14px; }

/* ===== 评论输入框 @用户搜索浮层 ===== */
.cm-box { position: relative; }
.cm-mention { position: absolute; left: 16px; right: 16px; bottom: 60px; max-height: 220px; overflow-y: auto; background: #fff; border: 1px solid #eee; border-radius: 12px; box-shadow: 0 8px 28px rgba(0,0,0,0.14); z-index: 5; }
.cmm-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer; transition: background 0.15s; }
.cmm-item + .cmm-item { border-top: 1px solid #f5f5f5; }
.cmm-item:hover, .cmm-item.active { background: #fff5f7; }
.cmm-avatar { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.cmm-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cmm-avatar-default { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg,#ffd0e0,#ffe6ef); color: #ff6b9d; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; }
.cmm-name { font-size: 14px; color: #333; }
.cmm-tip { padding: 16px; text-align: center; color: #bbb; font-size: 13px; }
.cm-at-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; border: 1px solid #eee; border-radius: 8px; background: #fff; color: #ff6b9d; font-size: 16px; font-weight: 700; cursor: pointer; }
.cm-at-btn:active { background: #fff5f7; }

/* ===== 靓号/账号徽章样式 ===== */
.pretty-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    line-height: 1.4;
    white-space: nowrap;
    vertical-align: middle;
    transition: transform .15s;
}
.pretty-badge:hover { transform: scale(1.05); }
.pretty-badge .pretty-icon { font-size: 11px; line-height: 1; }
.pretty-badge .pretty-num { font-family: monospace; letter-spacing: 0.5px; }
.pretty-badge-level-0 { background: #999; }
.pretty-badge-level-1 { background: #cd7f32; }
.pretty-badge-level-2 { background: linear-gradient(135deg, #c0c0c0, #e8e8e8); color: #555; }
.pretty-badge-level-3 { background: linear-gradient(135deg, #ffd700, #ffb300); color: #5a3e00; }
.pretty-badge-level-4 { background: linear-gradient(135deg, #00bcd4, #26c6da); }
.pretty-badge-level-5 { background: linear-gradient(135deg, #ff4500, #ff6b00); box-shadow: 0 0 8px rgba(255,69,0,0.4); }

/* 帖子卡片上的账号徽章 */
.wf-account-badge {
    margin-left: 4px;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 作者栏账号徽章 */
.pa-account-badge {
    margin-left: 6px;
}

/* 评论者账号徽章 */
.cm-account-badge {
    margin-left: 4px;
}

/* 用户主页账号徽章 */
.cu-account-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #7a5cff, #ff6b9d);
    color: #fff;
    padding: 4px 14px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(122, 92, 255, 0.3);
}
.cu-account-badge .cu-account-icon {
    font-size: 14px;
}
.cu-account-badge .cu-account-name {
    font-family: monospace;
    letter-spacing: 0.5px;
}
.cu-account-badge .cu-account-level {
    background: rgba(255,255,255,0.3);
    padding: 0 6px;
    border-radius: 8px;
    font-size: 11px;
    margin-left: 4px;
}

@media (min-width: 768px) {
    .mention-modal { align-items: center; }
    .mm-box { max-width: 520px; border-radius: 14px; }
}
