/* ============================================================
   css/panels/panels-moments.css — 朋友圈样式
   设计系统：暖米纸底 + 玫瑰色点缀 + 衬线体 + SVG线条图标
   零 emoji，微信级简约，法式花艺高级感
   ============================================================ */

/* ===== 面板容器 ===== */
#tab-moments {
    display: none;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    background: var(--bg-primary);
    /* ★ 2026 iOS：底部清除 72px（评论区可见）→ 加 --safe-bottom（iOS 安全区），末条卡片不被发布条盖住；
       安卓 --safe-bottom=0 → 仍 72px，零影响。 */
    padding-bottom: calc(72px + var(--safe-bottom));
    position: relative;  /* ★ 创建层叠上下文，让 Banner z-index 正确生效 */
}

/* ===== 朋友圈域：统一隐藏系统滚动条（微信式纯净滚动，触滑仍可滚；全局 4px 细条见 core.css）=====
   主面板 #tab-moments + 个人页/详情弹层/互动消息/全屏详情 等挂 body 的整屏层，
   内部所有滚动容器都不露侧边系统条（2026 甲方：底部栏进朋友圈侧边出现滚动条）。 */
#tab-moments,
#tab-moments *,
.personal-moments-overlay,
.personal-moments-overlay *,
.pm-detail-overlay,
.pm-detail-overlay *,
.mom-inter-msg-overlay,
.mom-inter-msg-overlay *,
#mom-detail-full,
#mom-detail-full * {
    scrollbar-width: none;        /* Firefox */
    -ms-overflow-style: none;     /* 旧 Edge/IE */
}
#tab-moments::-webkit-scrollbar,
#tab-moments *::-webkit-scrollbar,
.personal-moments-overlay ::-webkit-scrollbar,
.pm-detail-overlay ::-webkit-scrollbar,
.mom-inter-msg-overlay ::-webkit-scrollbar,
#mom-detail-full ::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

#tab-moments.active {
    display: flex;
}

/* ===== 时间线 ===== */
.moments-timeline {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    z-index: 1;  /* ★ 在 Banner (z-index:2) 之下 */
}

/* ===== 卡片 ===== */
.mom-card {
    background: var(--surface-solid);
    border-radius: 8px;
    padding: 16px;
    box-shadow: var(--shadow-xs), var(--shadow-sm);
    animation: momFadeIn 300ms ease-out;
    position: relative;
    z-index: 1;
}

/* 已渲染过的卡片不再播动画（增量更新时避免闪烁） */
.mom-card-seen {
    animation: none;
}

@keyframes momFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== 卡片头部 ===== */
.mom-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.mom-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
}

.mom-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mom-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-size: 14px;
    color: #fff;
}

.mom-avatar-placeholder.user-avatar {
    background: var(--sage);
}

.mom-avatar-placeholder.ai-avatar {
    background: var(--rose);
}

.mom-header-info {
    flex: 1;
    min-width: 0;
}

.mom-name {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.4;
}

.mom-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}
/* 隐私徽章（公开/私密——直接显示在卡片上，不消失） */
.mom-privacy-badge {
    display: inline-flex; align-items: center; gap: 2px;
    font-size: 10px; margin-left: 6px;
    padding: 1px 5px; border-radius: 3px;
}
.mom-privacy-badge svg { flex-shrink: 0; opacity: 0.7; }
.mom-privacy-private { color: var(--rose); background: var(--rose-light); }
.mom-privacy-public { color: var(--sage, #7a9e7e); background: var(--sage-light, #eaf5eb); }

/* ===== 正文 ===== */
.mom-content {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 6px;
    word-break: break-word;
}
/* Feed 卡片内截断长文本（4行），详情浮层取消截断 */
.moments-timeline .mom-content {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mom-detail-content .mom-content {
    display: block;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
    overflow: visible;
}
/* 仅截断卡片显示"查看详情" */
.mom-detail-hint { display: none; }
.mom-card-truncated .mom-detail-hint { display: block; }

/* ===== 图片 ===== */
.mom-images {
    margin-bottom: 10px;
}

.mom-images-single .mom-image-wrap {
    width: 100%;
    max-height: 300px;
    aspect-ratio: auto;
}

.mom-images-single .mom-image-wrap img {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 4px;
    aspect-ratio: auto;
    background: rgba(0,0,0,0.02);
}

.mom-images-double {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.mom-images-double .mom-image-wrap {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 4px;
}

.mom-images-double .mom-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mom-images-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.mom-images-grid .mom-image-wrap {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 4px;
}

.mom-images-grid .mom-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mom-image-wrap {
    cursor: pointer;
}

/* 图片加载失败——柔和占位 */
.mom-image-broken {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary, rgba(0,0,0,0.02));
    border-radius: 8px;
    min-height: 80px;
    position: relative;
}
.mom-image-broken::before {
    content: '';
    display: block;
    width: 32px;
    height: 32px;
    background: currentColor;
    opacity: 0.18;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='3'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='3'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E");
}
.mom-image-broken::after {
    content: '图片暂时无法加载';
    position: absolute;
    font-family: var(--font-body);
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0.5;
    bottom: 8px;
}

/* ===== 私密锁 ===== */
.mom-private-lock {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    padding: 8px 12px;
    background: rgba(0,0,0,0.02);
    border-radius: 6px;
    margin-bottom: 10px;
}

.mom-apply-btn {
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--rose);
    background: transparent;
    border: 1px solid var(--rose);
    border-radius: 16px;
    padding: 4px 16px;
    cursor: pointer;
    margin-top: 4px;
    transition: all 150ms ease;
}

.mom-apply-btn:hover {
    background: var(--rose);
    color: #fff;
}

.mom-cooldown-text {
    font-size: 11px;
    color: var(--text-muted);
    font-style: italic;
}

/* 等待审批中状态（金色脉冲） */
.mom-pending-notice {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--gold);
    padding: 6px 12px;
    margin-top: 6px;
    background: rgba(196, 168, 106, 0.06);
    border: 1px solid rgba(196, 168, 106, 0.15);
    border-radius: 12px;
    animation: momPendingPulse 2s ease-in-out infinite;
    flex-wrap: wrap;
}
@keyframes momPendingPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}
/* 审批中 → 小字提示 24h 过期规则 */
.mom-pending-tip {
    font-style: italic;
    opacity: 0.75;
    font-size: 10px;
    margin-left: 2px;
    width: 100%;
    color: var(--text-muted);
    animation: none;
}
/* 审批中 → 撤回按钮行 */
.mom-pending-actions {
    margin-top: 6px;
}
.mom-withdraw-btn {
    font-family: var(--font-body);
    font-size: 11px;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 3px 14px;
    cursor: pointer;
    transition: all 150ms ease;
}
.mom-withdraw-btn:hover {
    border-color: var(--rose);
    color: var(--rose);
}
/* 被拒（带理由） */
.mom-reject-reason {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 11px;
    color: var(--text-muted);
    padding: 6px 12px;
    margin-top: 6px;
    background: rgba(0,0,0,0.02);
    border-radius: 10px;
    line-height: 1.5;
}
/* 过期/已撤回 → 可重新申请的小字 */
.mom-expired-note {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 4px;
    opacity: 0.8;
}

/* 待审批摘要栏（时间线顶部金色提示） */
.mom-pending-summary {
    margin: 0 16px 8px;
    padding: 10px 14px;
    background: rgba(196, 168, 106, 0.06);
    border: 1px solid rgba(196, 168, 106, 0.2);
    border-radius: 10px;
    font-size: 12px;
    color: var(--gold);
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-body);
}

/* ===== 操作栏 ===== */
.mom-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-top: 8px;
    border-top: 1px solid rgba(0,0,0,0.04);
}

.mom-action-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--text-secondary);
    border-radius: 4px;
    transition: color 100ms ease;
}

.mom-action-btn:hover {
    color: var(--rose);
}

.mom-action-btn.liked {
    color: var(--rose);
}

.mom-delete-btn {
    margin-left: auto;
    opacity: 0.5;
}

.mom-delete-btn:hover {
    opacity: 1;
    color: var(--rose);
}

/* ===== 评论 ===== */
.mom-comments {
    margin-top: 8px;
    padding: 8px 10px;
    background: rgba(0,0,0,0.02);
    border-radius: 6px;
}

.mom-comment {
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-secondary);
    /* 长英文/网址自动折行，防撑破评论圆角背景（2026-03 审计修复） */
    overflow-wrap: anywhere;
}

.mom-comment + .mom-comment {
    margin-top: 4px;
}

.mom-comment-author {
    color: var(--rose);
    font-weight: 500;
}

/* ===== 评论输入 ===== */
.mom-comment-input {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.mom-comment-input input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid var(--border, rgba(0,0,0,0.1));
    border-radius: 16px;
    font-family: var(--font-body);
    font-size: 12px;
    background: var(--bg-primary);
    color: var(--text-primary);
    outline: none;
    transition: border-color 150ms ease;
}

.mom-comment-input input:focus {
    border-color: var(--rose);
    box-shadow: var(--shadow-glow);
}

.mom-comment-input button {
    padding: 6px 14px;
    border: none;
    border-radius: 16px;
    background: var(--rose);
    color: #fff;
    font-family: var(--font-body);
    font-size: 12px;
    cursor: pointer;
    transition: background 100ms ease;
}

.mom-comment-input button:hover {
    background: var(--rose-hover);
}

/* ===== 空状态 ===== */
.moments-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
}

.moments-empty-deco {
    font-family: 'Great Vibes', 'Cormorant Garamond Italic', cursive;
    font-size: 28px;
    color: var(--rose);
    opacity: 0.6;
    margin-bottom: 12px;
    letter-spacing: 0.04em;
}

.moments-empty-text {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.moments-empty-sub {
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--text-muted);
    opacity: 0.7;
}

/* ===== 底部发朋友圈按钮 ===== */
.moments-post-bar {
    position: fixed;
    /* ★ 2026 iOS 修复：原来写死 bottom:56px。安卓安全区=0 → 导航高恰 56px，按钮正好在导航上方；
       iOS 上导航总高 = calc(56px + 安全区≈34px) = 90px，写死 56px 会让按钮被导航盖住。
       改用 calc(var(--nav-height) + var(--safe-bottom))，跟随导航真实高度，安全区=0 时仍是 56px，零影响。 */
    bottom: calc(var(--nav-height) + var(--safe-bottom));
    left: 0;
    right: 0;
    padding: 10px 16px;
    background: linear-gradient(180deg, rgba(248,244,239,0) 0%, rgba(248,244,239,0.95) 30%, rgba(248,244,239,1) 100%);
    display: flex;
    justify-content: center;
    z-index: 5;
}

.moments-post-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 28px;
    border: none;
    border-radius: 24px;
    background: var(--rose);
    color: #fff;
    font-family: var(--font-body);
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(201,168,168,0.25), 0 2px 4px rgba(30,28,26,0.06);
    transition: all 150ms ease;
}

.moments-post-btn:hover {
    background: var(--rose-hover);
    box-shadow: 0 8px 24px rgba(201,168,168,0.35), 0 2px 6px rgba(30,28,26,0.08);
}

/* ===== 编辑器弹窗 ===== */
/* ===== 全屏朋友圈编辑器 ===== */
.moment-editor-overlay {
    position: fixed;
    top: 0; bottom: 0;
    left: 50%;
    width: 100%;
    max-width: 480px;
    transform: translateX(-50%);
    background: var(--bg-primary);
    z-index: 1560;
    display: flex;
    flex-direction: column;
    padding-top: var(--safe-top);
    animation: editorFadeIn 220ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
@keyframes editorFadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(8px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes overlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes overlayFadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(12px); }
}
/* 关闭动画 — overlay 背景渐隐 + 面板位移（资料卡 + 个人朋友圈页） */
.profile-card-overlay.pc-overlay-closing { animation: overlayFadeOut 0.18s ease-in forwards; }
.pc-panel.pc-closing { animation: overlayFadeOut 0.18s ease-in forwards; }
.personal-moments-overlay.pm-overlay-closing { animation: overlayFadeOut 0.18s ease-in forwards; }
.personal-moments-panel.pm-closing { animation: overlayFadeOut 0.18s ease-in forwards; }

.moment-editor-card {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
}

/* ── Header ── */
.moment-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(196,168,106,0.15);
    flex-shrink: 0;
    background: var(--bg-primary);
}
.moment-editor-close {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 150ms ease;
}
.moment-editor-close:hover {
    color: var(--rose);
    background: var(--rose-light);
}

/* ── Scrollable body ── */
.moment-editor-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(8px + var(--safe-bottom, 0px));
}
.moment-editor-textarea {
    width: 100%;
    min-height: 140px;
    padding: 18px 16px;
    border: none;
    outline: none;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--text-primary);
    background: transparent;
    resize: none;
    line-height: 1.8;
    box-sizing: border-box;
}
.moment-editor-textarea::placeholder {
    color: var(--text-muted);
    font-style: italic;
}

/* ── Bottom toolbar ── */
.moment-editor-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-top: 1px solid rgba(196,168,106,0.12);
    flex-shrink: 0;
    background: var(--bg-primary);
}
.moment-editor-add-img {
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 150ms ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-body);
    font-size: 13px;
    padding: 6px 0;
}
.moment-editor-add-img:hover {
    color: var(--rose);
}
.moment-editor-add-img:active {
    transform: scale(0.96);
}
.moment-editor-privacy {
    display: flex;
    gap: 6px;
}
.moment-privacy-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: transparent;
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 180ms ease;
}
.moment-privacy-btn:hover {
    border-color: var(--rose);
}
.moment-privacy-btn:active {
    transform: scale(0.96);
}
.moment-privacy-btn.active {
    border-color: var(--rose);
    color: var(--rose);
    background: var(--rose-light);
    box-shadow: 0 0 0 2px var(--rose-light);
}

/* ── 编辑器图片预览 ── */
.moment-editor-images {
    display: none;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 16px 8px;
}
.moment-editor-img-wrap {
    width: 74px;
    height: 74px;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}
.moment-editor-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.moment-editor-img-remove {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 50%;
    background: rgba(30,28,26,0.45);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 100ms ease;
}
.moment-editor-img-remove:hover {
    background: rgba(30,28,26,0.7);
}

/* ===== 删除状态 ===== */
.mom-card-deleted {
    opacity: 0.6;
}

.mom-deleted-content {
    font-style: italic;
    color: var(--text-muted);
}

/* ===== 已授权私密标记 ===== */
.mom-approved {
    color: var(--sage) !important;
}

/* ===== 评论：可点击回复（指尖反馈）+「A 回复 B」样式 ===== */
.mom-comment {
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    border-radius: 5px;
}
.mom-comment:active { background: rgba(0, 0, 0, 0.05); }
.mom-comment-me .mom-comment-author { color: var(--text-primary); font-weight: 600; }
.mom-comment-author { pointer-events: none; }
.mom-comment-replyto {
    color: var(--text-muted); font-style: italic; font-size: 11.5px;
}

/* ===== 分享卡片 ===== */
.mom-share-card {
    margin-bottom: 10px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0,0,0,0.02);
    border: 1px solid rgba(0,0,0,0.05);
}

.mom-share-music {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mom-share-cover {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: var(--rose-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--rose);
    margin: 10px;
}

.mom-share-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mom-share-cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

.mom-share-info {
    flex: 1;
    min-width: 0;
}

.mom-share-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

.mom-share-title {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 2px;
}

.mom-share-sub {
    font-size: 11px;
    color: var(--text-muted);
}

.mom-share-quote {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    font-style: italic;
    margin-top: 4px;
    padding-left: 8px;
    border-left: 2px solid var(--rose);
}

/* ===== 右上角菜单按钮 ===== */
.mom-card-menu-btn {
    position: absolute;
    top: 10px;
    right: 12px;
    padding: 4px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text-muted);
    opacity: 0.5;
    transition: opacity 100ms ease;
}

.mom-card-menu-btn:hover {
    opacity: 1;
    color: var(--text-primary);
}

/* ===== 上下文菜单 ===== */
.moments-context-menu {
    position: fixed;         /* ★ fixed 脱离 #app backdrop-filter 创建的层上下文 */
    z-index: var(--z-menu);
    background: rgba(255,252,249,0.97);
    backdrop-filter: blur(20px);
    border-radius: 10px;
    box-shadow: var(--shadow-md), var(--shadow-glow);
    padding: 6px;
    min-width: 160px;
    animation: momFadeIn 150ms ease-out;
}

.mom-ctx-item {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: transparent;
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    border-radius: 6px;
    transition: background 100ms ease;
}

.mom-ctx-item:hover {
    background: var(--rose-light);
}

.mom-ctx-danger {
    color: var(--rose) !important;
}

.mom-ctx-danger:hover {
    background: rgba(201,168,168,0.15);
}

.mom-ctx-divider {
    height: 1px;
    background: rgba(0,0,0,0.06);
    margin: 4px 8px;
}

/* ===== 上传中旋转 ===== */
.moment-editor-img-uploading {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.03);
}

.mom-upload-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--rose-light);
    border-top: 2px solid var(--rose);
    border-radius: 50%;
    animation: momSpin 0.8s linear infinite;
}

@keyframes momSpin {
    to { transform: rotate(360deg); }
}

/* 图片上传错误状态 */
.moment-editor-img-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(200,80,60,0.06);
    border: 1px dashed rgba(200,80,60,0.3);
    gap: 2px;
}

.mom-img-error-icon {
    color: rgba(200,80,60,0.5);
    display: flex;
}

.moment-editor-img-retry {
    font-size: 9px;
    border: none;
    background: rgba(200,80,60,0.1);
    color: rgba(200,80,60,0.8);
    border-radius: 3px;
    padding: 1px 6px;
    cursor: pointer;
}

/* 拖拽排序手柄 */
.mom-img-drag-handle {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    font-size: 10px;
    line-height: 16px;
    text-align: center;
    color: rgba(255,255,255,0.7);
    background: rgba(0,0,0,0.25);
    border-radius: 3px;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    opacity: 0;
    transition: opacity 0.15s;
}

.moment-editor-img-wrap:hover .mom-img-drag-handle {
    opacity: 1;
}

/* ===== 编辑器分享预览 ===== */
.mom-editor-share-preview {
    padding: 10px 16px 0;
}

.mom-editor-share-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 6px;
}

.mom-editor-share-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(0,0,0,0.02);
    border-radius: 8px;
    font-size: 12px;
    color: var(--text-primary);
}

/* 书摘泡泡预览卡 */
.mom-editor-bookmark-card {
    padding: 14px 16px;
    background: linear-gradient(176deg, #FFFEFA 0%, #FDFAF2 60%, #F8F2E4 100%);
    border: 1px solid rgba(200,160,150,0.25);
    border-top: 2px solid rgba(200,160,150,0.4);
    border-radius: 4px 12px 12px 4px;
    box-shadow: 1px 2px 8px rgba(150,130,100,0.12);
}
.mom-editor-bookmark-book {
    font-size: 11px; color: var(--accent-rose, #B87878);
    margin-bottom: 6px; letter-spacing: 0.5px;
    font-family: var(--font-decorative); font-style: italic;
}
.mom-editor-bookmark-quote {
    font-family: var(--font-handwriting); font-size: 15px; line-height: 1.8;
    color: #5a4030; word-break: break-word;
    border-left: 2px solid rgba(200,160,150,0.4);
    padding-left: 10px; margin-bottom: 8px;
}
.mom-editor-bookmark-note {
    font-family: var(--font-handwriting); font-size: 13px; line-height: 1.7;
    color: var(--text-secondary); word-break: break-word;
    border-top: 1px dashed rgba(0,0,0,0.07); padding-top: 8px;
}

/* 穿搭泡泡预览卡 */
.mom-editor-outfit-card {
    padding: 10px;
    background: rgba(0,0,0,0.02);
    border: 1px solid rgba(200,160,150,0.25);
    border-radius: 10px;
}
.mom-editor-outfit-card img {
    width: 100%; max-height: 220px; object-fit: contain;
    border-radius: 6px; background: var(--bg-primary); display: block;
}
.mom-editor-outfit-name {
    font-family: var(--font-reading); font-size: 13px; color: var(--text-primary);
    text-align: center; margin-top: 8px; letter-spacing: 1px;
}

/* ===== 个人朋友圈页面 ===== */
.personal-moments-overlay {
    position: fixed;
    top: 0; bottom: 0; left: 0; right: 0;
    max-width: 480px; margin: 0 auto;
    padding-top: var(--safe-top);
    background: var(--bg-primary);
    z-index: 200;
    display: flex;
    flex-direction: column;
    /* ★ 入场/退场由 JS 控制 translateX 滑动（微信 push/pop），避免同底色交叉淡入导致的空白面板 */
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);  /* ★ close 路径 */
    will-change: transform;
}
.personal-moments-overlay.pm-slide-in {
    transform: translateX(0);
    /* ★ open 路径用 keyframes（手机合成层竞态免疫，同色盘修复方案），避免页面消失又出现 */
    animation: pmSlideIn 0.3s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
@keyframes pmSlideIn {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
}
/* ★ close 方向独占过渡：清掉 pm-slide-in 的入场动画(双驱动)，改用 transition 滑出 */
.personal-moments-overlay.pm-slide-out {
    animation: none;
    transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
    transform: translateX(100%);
}

.personal-moments-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.personal-moments-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    background: var(--surface-solid);
    flex-shrink: 0;
}

.personal-moments-back {
    padding: 4px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 100ms ease;
}

.personal-moments-back:hover {
    color: var(--text-primary);
}

.personal-moments-title {
    font-family: 'Playfair Display Italic', 'Cormorant Garamond', serif;
    font-size: 17px;
    color: var(--text-primary);
    letter-spacing: 0.03em;
}

.personal-moments-search {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    gap: 8px;
    background: var(--surface-solid);
    border-bottom: 1px solid rgba(0,0,0,0.04);
    flex-shrink: 0;
}

.personal-moments-search input[type="text"] {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 20px;
    font-family: var(--font-body);
    font-size: 13px;
    background: var(--bg-primary);
    color: var(--text-primary);
    outline: none;
    transition: border-color 150ms ease;
}

.personal-moments-search input[type="text"]:focus {
    border-color: var(--rose);
    box-shadow: var(--shadow-glow);
}

.personal-moments-search input[type="month"] {
    padding: 8px 10px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 16px;
    font-family: var(--font-body);
    font-size: 12px;
    background: var(--bg-primary);
    color: var(--text-primary);
    outline: none;
}

.personal-moments-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ===== 窄屏适配 ===== */
@media (max-width: 375px) {
    .moments-timeline {
        padding: 12px 8px;
        gap: 12px;
    }

    .mom-card {
        padding: 12px;
    }

    .moments-post-bar {
        padding: 8px 12px;
    }

    .personal-moments-search {
        flex-direction: column;
        padding: 8px 12px;
    }

    .personal-moments-search input[type="month"] {
        width: 100% !important;
        margin-left: 0 !important;
    }
}

/* ============================================================
   微信式个人朋友圈页（封面+日期分组）+ 他的资料卡页
   ============================================================ */

.pm-scroll { flex: 1; overflow-y: auto; }

/* 封面区 */
.pm-cover {
    position: relative; height: 240px;
    background-size: cover; background-position: center;
}
.pm-cover-default {
    background:
        radial-gradient(ellipse 75% 60% at 20% 0%, rgba(201, 168, 168, 0.5), transparent 60%),
        radial-gradient(ellipse 65% 55% at 95% 90%, rgba(184, 168, 196, 0.42), transparent 60%),
        linear-gradient(165deg, #E9DCD3 0%, #DECDC3 55%, #CBB4AC 100%);
}
.pm-cover::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(180deg, rgba(30,28,26,0.22), transparent 30%, transparent 62%, rgba(30,28,26,0.3));
}
.pm-back, .pm-search-btn {
    position: absolute; top: calc(10px + env(safe-area-inset-top, 0px)); z-index: 2;
    width: 34px; height: 34px; border-radius: 50%;
    border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    background: rgba(30, 28, 26, 0.22);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    color: #FCFAF6;
}
.pm-back { left: 12px; }
.pm-search-btn { right: 12px; }
.pm-identity {
    position: absolute; right: 16px; bottom: -26px; z-index: 2;
    display: flex; align-items: flex-end; gap: 12px;
}
.pm-name {
    font-size: 17px; font-weight: 600; letter-spacing: 1px;
    color: #FCFAF6; text-shadow: 0 1px 8px rgba(30, 28, 26, 0.45);
    margin-bottom: 34px;
}
.pm-avatar {
    width: 68px; height: 68px; border-radius: 14px; overflow: hidden;
    background: #E9DCD3;
    border: 2.5px solid rgba(252, 250, 246, 0.95);
    box-shadow: 0 2px 4px rgba(30,28,26,0.15), 0 6px 18px rgba(30,28,26,0.2);
    display: flex; align-items: center; justify-content: center;
}
.pm-avatar img { width: 100%; height: 100%; object-fit: cover; }
/* 个人页签名（头像下方靠右，紧贴头像） */
.pm-signature {
    font-family: var(--font-body); font-size: 12px; color: var(--text-muted);
    text-align: right; padding: 42px 20px 4px; /* 姓名+头像突出约68px+bottom:-26px，42px贴合 */
    font-style: italic; opacity: 0.8;
    line-height: 1.5;
}
/* 条目卡片化（圆角 + 阴影 + 分隔感） */
.pm-entry {
    background: var(--surface-solid);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 8px;
    box-shadow: var(--shadow-xs);
    transition: box-shadow 0.2s, transform 0.2s;
}
.pm-entry:active { transform: scale(0.98); }
.pm-entry-text {
    font-family: var(--font-body); font-size: 14px;
    color: var(--text-primary); line-height: 1.6;
    margin-bottom: 8px;
}
.pm-avatar-fallback {
    font-family: 'Playfair Display', serif; font-style: italic;
    font-size: 26px; color: var(--text-secondary, #8A8278);
}
.pm-search-bar {
    display: flex; flex-direction: column; gap: 8px; padding: 40px 16px 8px;
    background: var(--surface-solid);
    border-bottom: 1px solid var(--border-faint);
}
.pm-search-row {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 12px;
    background: var(--input-bg); border: 1px solid var(--border);
    border-radius: 12px;
}
.pm-search-icon { color: var(--text-muted); flex-shrink: 0; }
.pm-search-row input {
    flex: 1; padding: 6px 0; min-width: 0; border: none; outline: none;
    font-size: 13px; font-family: inherit;
    background: transparent; color: var(--text-primary);
}
.pm-date-picker {
    display: flex; gap: 8px; position: relative;
}
.pm-date-btn {
    flex: 1; display: flex; align-items: center; justify-content: space-between;
    padding: 8px 12px;
    background: var(--input-bg); border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 13px; font-family: inherit; color: var(--text-primary);
    cursor: pointer; gap: 6px;
}
.pm-date-btn:hover { border-color: var(--rose); }
.pm-date-btn svg { color: var(--text-muted); flex-shrink: 0; }
.pm-date-dropdown {
    position: absolute; top: 100%; z-index: 20;
    background: var(--surface-solid);
    border: 1px solid var(--border); border-radius: 10px;
    box-shadow: var(--shadow-md);
    max-height: 200px; overflow-y: auto;
    min-width: 100px;
}
/* 年份下拉靠左，月份靠右 */
#pm-year-drop { left: 0; }
#pm-month-drop { right: 0; }
.pm-date-option {
    padding: 10px 16px; font-size: 13px; font-family: var(--font-body);
    color: var(--text-primary); cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}
.pm-date-option:hover { background: var(--bg-rose-warm); color: var(--rose-dark); }
.pm-date-option:first-child { color: var(--text-muted); font-style: italic; }

/* 日期分组时间线 */
#personal-moments-overlay .personal-moments-list { padding: 44px 16px 40px; }
.pm-day-group {
    display: flex; gap: 14px; margin-bottom: 22px;
}
.pm-day-col { width: 62px; flex-shrink: 0; padding-top: 2px; }
.pm-day-word { font-size: 19px; font-weight: 700; color: var(--text-primary); letter-spacing: 1px; }
.pm-day-num {
    font-family: 'Playfair Display', var(--font-decorative), serif;
    font-size: 26px; font-weight: 600; color: var(--text-primary);
    margin-right: 4px; font-variant-numeric: tabular-nums;
}
.pm-day-month { font-size: 12px; color: var(--text-muted); }
.pm-day-content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.pm-entry { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pm-entry:active { opacity: 0.75; }
.pm-entry-text {
    font-size: 14px; line-height: 1.65; color: var(--text-primary);
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
    margin-bottom: 6px;
}
.pm-entry-faint { color: var(--text-muted); }
.pm-entry-img-single { max-width: 190px; border-radius: 8px; overflow: hidden; }
.pm-entry-img-single img { width: 100%; max-height: 240px; object-fit: cover; display: block; }
.pm-entry-grid { display: grid; gap: 3px; max-width: 230px; }
.pm-grid-2 { grid-template-columns: repeat(2, 1fr); }
.pm-grid-3 { grid-template-columns: repeat(3, 1fr); }
.pm-grid-4 { grid-template-columns: repeat(2, 1fr); }
.pm-grid-cell { position: relative; aspect-ratio: 1; border-radius: 6px; overflow: hidden; }
.pm-grid-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pm-grid-more {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(30, 28, 26, 0.45); color: #FCFAF6;
    font-size: 15px; font-weight: 600;
}
.pm-entry-share {
    display: inline-block; margin-top: 5px;
    padding: 3px 10px; border-radius: 8px;
    background: rgba(201, 168, 168, 0.12);
    border: 1px solid rgba(201, 168, 168, 0.3);
    font-size: 11px; color: var(--accent-rose, #b08585);
}
.pm-entry-meta { margin-top: 5px; font-size: 11px; color: var(--text-muted); }
.pm-load-more {
    text-align: center; padding: 16px; cursor: pointer;
    font-size: 12.5px; color: var(--text-muted);
}

/* 单条详情浮层（完整卡片） */
.pm-detail-overlay {
    position: fixed; inset: 0; z-index: 260;
    display: flex; align-items: center; justify-content: center;
    background: rgba(30, 28, 26, 0.45);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    padding: 24px 14px;
    animation: overlayFadeIn 0.2s ease;
}
.pm-detail-card {
    width: 100%; max-width: 430px; max-height: 84vh; overflow-y: auto;
    background: var(--bg-primary, #F8F4EF);
    border-radius: 16px; padding: 6px 4px;
    box-shadow: 0 2px 8px rgba(30,28,26,0.12), 0 18px 50px rgba(30,28,26,0.3);
}
/* 个人页详情关闭按钮 */
.pm-detail-close-btn {
    position: absolute; top: 16px; right: 16px; z-index: 10;
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(0,0,0,0.35); color: #fff;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; opacity: 0.7; transition: opacity 0.15s;
}
.pm-detail-close-btn:hover { opacity: 1; background: rgba(0,0,0,0.5); }

/* ===== 他的资料卡页（与个人朋友圈统一：横向滑入/滑出，进入从右滑入、退出向右滑出）===== */
.profile-card-overlay {
    position: fixed; top: 0; bottom: 0; left: 0; right: 0;
    max-width: 480px; margin: 0 auto;
    z-index: 200;
    background: var(--bg-primary, #F8F4EF);
    padding-top: var(--safe-top);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: transform;
}
.profile-card-overlay.pc-slide-in {
    transform: translateX(0);
    animation: pmSlideIn 0.3s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
/* ★ close 方向独占过渡：清掉入场动画(双驱动)改用 transition 滑出 → 用 pc-slide-out 显式触发 */
.profile-card-overlay.pc-slide-out {
    animation: none;
    transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
    transform: translateX(100%);
}
.pc-panel { height: 100%; overflow-y: auto; }
.pc-cover {
    position: relative; height: 250px;
    background-size: cover; background-position: center;
}
.pc-cover-default {
    background:
        radial-gradient(ellipse 75% 60% at 20% 0%, rgba(201, 168, 168, 0.5), transparent 60%),
        radial-gradient(ellipse 65% 55% at 95% 90%, rgba(184, 168, 196, 0.42), transparent 60%),
        linear-gradient(165deg, #E9DCD3 0%, #DECDC3 55%, #CBB4AC 100%);
}
.pc-cover::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(180deg, rgba(30,28,26,0.2), transparent 32%, transparent 65%, rgba(30,28,26,0.38));
}
.pc-back {
    position: absolute; top: calc(10px + env(safe-area-inset-top, 0px)); left: 12px; z-index: 2;
    width: 34px; height: 34px; border-radius: 50%; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    background: rgba(30, 28, 26, 0.22);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    color: #FCFAF6;
}
.pc-cover-edit {
    position: absolute; right: 12px; bottom: 12px; z-index: 2;
    width: 32px; height: 32px; border-radius: 50%; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    background: rgba(30, 28, 26, 0.25);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    color: rgba(252, 250, 246, 0.9);
}
.pc-identity {
    display: flex; align-items: flex-end; gap: 14px;
    padding: 0 20px; margin-top: -34px; position: relative; z-index: 2;
}
.pc-avatar-ring {
    width: 82px; height: 82px; border-radius: 20px; padding: 3px; flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent-rose, #C9A8A8) 0%, var(--gold, #C4A86A) 50%, var(--accent-lavender, #B8A8C4) 100%);
    box-shadow: 0 2px 4px rgba(30,28,26,0.12), 0 8px 22px rgba(30,28,26,0.16);
}
.pc-avatar {
    width: 100%; height: 100%; border-radius: 17px; overflow: hidden;
    background: var(--surface-solid, #fff);
    display: flex; align-items: center; justify-content: center;
}
.pc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pc-avatar-fallback {
    font-family: 'Playfair Display', serif; font-style: italic;
    font-size: 30px; color: var(--text-secondary, #8A8278);
}
.pc-name-block { padding-bottom: 2px; min-width: 0; }
.pc-name {
    font-size: 20px; font-weight: 600; letter-spacing: 1px;
    color: var(--text-primary);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pc-name-en {
    font-family: 'Great Vibes', 'Playfair Display', serif;
    font-size: 15px; color: var(--gold, #C4A86A); opacity: 0.75;
    margin-top: 2px; letter-spacing: 0.5px;
}
.pc-rows { padding: 22px 16px; display: flex; flex-direction: column; gap: 10px; }
.pc-row {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 16px; border-radius: 14px; cursor: pointer;
    background: var(--surface, rgba(255, 252, 249, 0.82));
    border: 1px solid rgba(196, 168, 106, 0.2);
    box-shadow: 0 1px 2px rgba(30,28,26,0.04), 0 2px 8px rgba(30,28,26,0.05);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.pc-row:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(30,28,26,0.08), 0 4px 12px rgba(30,28,26,0.06);
}
.pc-row:active { transform: scale(0.985); }
.pc-row-icon { color: var(--accent-rose); display: flex; flex-shrink: 0; opacity: 0.65; }
.pc-row-label { font-size: 14.5px; font-weight: 500; color: var(--text-primary); letter-spacing: 0.5px; }
.pc-row-thumbs { margin-left: auto; display: flex; gap: 6px; }
.pc-row-thumbs img {
    width: 38px; height: 38px; border-radius: 6px; object-fit: cover;
    box-shadow: 0 1px 3px rgba(30,28,26,0.12);
}
/* 朋友圈预览四宫格 */
.pc-thumb-cell {
    width: 52px; height: 52px; border-radius: 6px;
    overflow: hidden; flex-shrink: 0;
    background: var(--bg-primary);
    transition: transform 150ms ease;
}
.pc-thumb-cell:hover { transform: scale(1.06); }
.pc-thumb-cell img { width:100%; height:100%; object-fit:cover; }
.pc-thumb-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
}
.pc-thumb-text {
    display: flex; align-items: center; justify-content: center;
    padding: 4px; font-size: 9px; color: var(--text-muted);
    line-height: 1.3; text-align: center; font-style: italic;
    font-family: var(--font-body);
}
.pc-thumb-share {
    display: flex; align-items: center; justify-content: center;
    color: var(--rose);
}
/* 签名行（资料卡：紧贴头像下方靠左） */
.pc-signature {
    font-size: 11px; color: var(--text-muted);
    text-align: left; padding: 2px 20px 4px;
    font-style: italic; opacity: 0.75;
    font-family: var(--font-body);
    line-height: 1.5;
    word-break: break-word;
    display: flex; align-items: flex-start; gap: 6px;
}
.pc-sig-dot {
    flex-shrink: 0; width: 5px; height: 5px; border-radius: 50%;
    background: var(--accent-rose); opacity: 0.5;
    margin-top: 5px;
}
.pc-row-hint { margin-left: auto; font-size: 11.5px; color: var(--text-muted); }
.pc-row-arrow { color: var(--text-muted); display: flex; flex-shrink: 0; }

@media (max-width: 375px) {
    .pm-cover, .pc-cover { height: 210px; }
    .pm-day-col { width: 52px; }
    .pm-day-num { font-size: 22px; }
}

/* ===== 朋友圈顶部 Banner（头图+我的头像+签名）===== */
.mom-banner {
    position: relative;
    z-index: 10;  /* ★ 高优先级，确保不被时间线卡片遮挡 */
    isolation: isolate;  /* ★ 强制独立层叠上下文 */
}

.mom-banner-cover {
    height: 200px;
    position: relative;
    z-index: 1;
    background-size: cover;
    background-position: center;
}

.mom-banner-cover-default {
    background: linear-gradient(160deg, #E9DCD3 0%, #DECDC3 30%, #D5C0B8 60%, #CBB4AC 100%);
}

.mom-banner-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    height: 200px;
    background: linear-gradient(180deg, rgba(30,28,26,0.12) 0%, transparent 45%, rgba(30,28,26,0.25) 100%);
    pointer-events: none;
}

.mom-banner-edit {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(30,28,26,0.22);
    backdrop-filter: blur(6px);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 150ms ease;
    z-index: 3;
}

.mom-banner-edit:hover {
    background: rgba(30,28,26,0.35);
    transform: scale(1.08);
}

.mom-banner-edit:active {
    transform: scale(0.95);
}

.mom-banner-info {
    position: relative;
    z-index: 10;  /* ★ 头像+名字+签名始终在最上面 */
    margin-top: -52px;
    padding: 0 20px 16px;
    text-align: center;
    background: inherit;  /* 继承父背景防止穿透 */
}

.mom-banner-avatar {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    margin: 0 auto 10px;
    overflow: hidden;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(30,28,26,0.12);
    position: relative;
    z-index: 1;
}

.mom-banner-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mom-banner-avatar-placeholder {
    width: 100%;
    height: 100%;
    background: var(--accent-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-size: 26px;
}

/* 「不要头像框」模式（html[data-avatar-frame="off"]）：上面那圈 3px 白边会把照片挤小一圈——
   68px 的框里照片只画到 62px，四边各露 3px 白边、圆角也对不上，看上去就是「图片没铺满那个圆角方框」。
   框本身的圆角/花环归主题包管（theme-craft-base.css），这里只负责让照片铺满整个框：
   off 时去掉这圈白边，照片就是 68px、圆角跟着框走，一点缝都不留。
   头像框开着（on）的观感一个像素都不动。 */
html[data-avatar-frame="off"] .mom-banner-avatar {
    border: 0;
}

.mom-banner-name {
    font-family: var(--font-body);
    font-size: 17px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.3;
    position: relative;
    z-index: 1;
}

.mom-banner-name-en {
    font-family: 'Playfair Display Italic', var(--font-decorative);
    font-size: 12px;
    color: var(--gold);
    opacity: 0.5;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
}

.mom-banner-sig {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    font-style: italic;
    position: relative;
    z-index: 1;
}

/* ===== 点赞名字行（微信风格）===== */
.mom-like-names {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 0 0;
    font-size: 12px;
    color: var(--text-secondary);
}

.mom-like-names svg {
    flex-shrink: 0;
    margin-right: 2px;
}

/* ===== 互动提醒列表（微信消息风格）===== */
.mom-reminders {
    margin: 0 16px 12px;
}

.mom-reminder-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: var(--surface-solid);
    border-radius: 10px;
    cursor: pointer;
    box-shadow: var(--shadow-xs);
    transition: all 150ms ease;
    margin-bottom: 6px;
}

.mom-reminder-item:hover {
    background: var(--rose-light);
}

.mom-reminder-item:active {
    transform: scale(0.98);
}

.mom-reminder-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.mom-reminder-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mom-reminder-avatar-placeholder {
    width: 100%;
    height: 100%;
    background: var(--accent-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
}

.mom-reminder-body {
    flex: 1;
    min-width: 0;
}

.mom-reminder-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.mom-reminder-action {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.mom-reminder-snippet {
    font-size: 11px;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mom-reminder-time {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===== 编辑器标题+副标题 ===== */
.moment-editor-title-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.moment-editor-title {
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

.moment-editor-subtitle {
    font-family: 'Playfair Display Italic', var(--font-decorative);
    font-size: 11px;
    color: var(--gold);
    opacity: 0.5;
    letter-spacing: 0.05em;
}

/* ===== 发布按钮对比度增强 ===== */
.moment-editor-submit {
    padding: 6px 18px;
    border: none;
    border-radius: 18px;
    background: var(--rose);
    color: #fff;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 150ms ease;
    text-shadow: 0 1px 2px rgba(0,0,0,0.12);
    box-shadow: 0 2px 6px rgba(201,168,168,0.2);
}

.moment-editor-submit:hover {
    background: var(--rose-hover);
    box-shadow: 0 4px 12px rgba(201,168,168,0.3);
    transform: scale(1.03);
}

.moment-editor-submit:active {
    transform: scale(0.97);
}

/* ===== 卡片精细化 ===== */
.mom-card {
    border-radius: 12px;
    transition: box-shadow 200ms ease;
}

.mom-card:hover {
    box-shadow: var(--shadow-sm), var(--shadow-md);
}

.mom-images-single .mom-image-wrap img,
.mom-images-double .mom-image-wrap img,
.mom-images-grid .mom-image-wrap img {
    border-radius: 8px;
    transition: transform 150ms ease;
}

.mom-image-wrap:hover img {
    transform: scale(1.02);
}

/* ===== 深色模式适配 ===== */
[data-theme-mode="dark"] .mom-banner-cover {
    background: linear-gradient(160deg, #2A2420 0%, #25201C 50%, #1E1A18 100%);
}

[data-theme-mode="dark"] .mom-banner-avatar {
    border-color: #333;
}

[data-theme-mode="dark"] .mom-reminder-item {
    background: var(--surface-solid);
}

[data-theme-mode="dark"] .mom-reminder-item:hover {
    background: rgba(201,168,168,0.06);
}

[data-theme-mode="dark"] .moments-post-bar {
    background: linear-gradient(180deg, transparent 0%, rgba(26,22,20,0.95) 30%, var(--bg-primary) 100%);
}
[data-theme-mode="dark"] .moment-editor-card {
    background: var(--bg-primary);
}
/* ===== AI 浏览状态条 ===== */
.moments-ai-status {
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    padding: 4px 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    opacity: 0.7;
}

/* ===== AI看过了标签 ===== */
.mom-browsed-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: var(--text-muted);
    margin-left: 4px;
    opacity: 0.7;
}

[data-theme-mode="dark"] .moment-editor-header,
[data-theme-mode="dark"] .moment-editor-toolbar {
    background: var(--bg-primary);
}
/* ===== 详情浮层（点击卡片打开）===== */
.mom-detail-overlay {
    position: fixed; inset: 0; z-index: 200;
    display: flex; align-items: flex-end; justify-content: center;
}
.mom-detail-backdrop {
    position: absolute; inset: 0;
    background: rgba(30,28,26,0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.mom-detail-sheet {
    position: relative; z-index: 1;
    width: 100%; max-width: 480px; max-height: 85vh;
    background: var(--bg-primary);
    border-radius: 16px 16px 0 0;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.3s ease-out;
    box-shadow: 0 -4px 20px rgba(30,28,26,0.12);
}
.mom-detail-close {
    position: sticky; top: 0; z-index: 2;
    display: flex; justify-content: flex-end;
    padding: 12px 16px;
    background: var(--bg-primary);
    cursor: pointer; opacity: 0.6; transition: opacity 0.15s;
}
.mom-detail-close:hover { opacity: 1; }
.mom-detail-content { padding: 0 16px 24px; }
.mom-detail-content .mom-card {
    box-shadow: none; margin: 0; cursor: default;
    pointer-events: auto;  /* 允许卡片内交互 */
}
.mom-detail-content .mom-detail-hint { display: none; }

/* 卡片右下角"查看详情"提示 */
.mom-detail-hint {
    text-align: right; font-size: 11px;
    color: var(--text-muted); opacity: 0.55;
    padding-top: 4px; font-style: italic;
}
.mom-card:active .mom-detail-hint { opacity: 1; }

/* ===== 朋友圈「全屏右滑详情页」（统一入口，微信式 push/pop） ===== */
.mom-detail-full {
    position: fixed; top: 0; bottom: 0; left: 50%;
    width: 100%; max-width: 480px;
    transform: translateX(calc(-50% + 100%));
    transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
    background: var(--bg-primary);
    z-index: 300; will-change: transform;   /* ★ 个人页 overlay 挂 body z-index:200；全屏详情挂 body 需 ≥ 该值，否则被个人页盖住 */
    display: flex; flex-direction: column;
    padding-top: var(--safe-top);
}
.mom-detail-full.mom-detail-full-open {
    transform: translateX(-50%);
    animation: momDetailFullIn 0.3s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
@keyframes momDetailFullIn {
    from { transform: translateX(calc(-50% + 100%)); }
    to   { transform: translateX(-50%); }
}
/* close 方向独占过渡：清掉入场动画（双驱动）、向右滑出 */
.mom-detail-full.mom-detail-full-close {
    animation: none;
    transform: translateX(calc(-50% + 100%));
}
.mom-detail-full-panel {
    display: flex; flex-direction: column; height: 100%; overflow: hidden;
}
.mom-detail-full-header {
    display: grid; grid-template-columns: 44px 1fr 44px; align-items: center;
    padding: 12px 14px; background: var(--surface-solid);
    border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.mom-detail-full-back {
    background: none; border: none; padding: 4px; display: flex;
    align-items: center; justify-self: start; color: var(--text-primary); cursor: pointer;
}
.mom-detail-full-title {
    text-align: center; font-size: 16px; font-weight: 600;
    font-family: var(--font-serif); color: var(--text-primary);
}
.mom-detail-full-spacer { width: 44px; justify-self: end; }
.mom-detail-full-scroll {
    flex: 1; overflow-y: auto;
    padding: 8px 16px calc(24px + env(safe-area-inset-bottom, 0px));
    background: var(--bg-primary);
}
.mom-detail-full-card .mom-card {
    box-shadow: none; margin: 0; cursor: default; pointer-events: auto;
}
.mom-detail-full-card .mom-detail-hint { display: none; }

[data-theme-mode="dark"] .moments-context-menu {
    background: var(--surface-solid);
    border-color: var(--border);
}

/* ===== 朋友圈「N条消息」入口框（紧凑，微信式；居中摆放） ===== */
.mom-msgbox {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    margin: 12px auto 4px; padding: 7px 12px;
    width: fit-content; max-width: 90%;
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}
.mom-msgbox:active { transform: scale(0.97); background: var(--surface); }
.mom-msgbox-avatar {
    width: 22px; height: 22px; border-radius: 50%; overflow: hidden;
    background: rgba(0,0,0,0.06); flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}
.mom-msgbox-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mom-msgbox-avatar-fallback { font-family: var(--font-serif-en); font-style: italic; font-size: 11px; color: var(--rose); }
.mom-msgbox-count { font-size: 12.5px; color: var(--text-primary); white-space: nowrap; }
.mom-msgbox-chevron { color: var(--text-muted); flex-shrink: 0; width: 14px; height: 14px; }

/* ===== 「与我的互动消息」列表页（微信式 push，手机框内，随主题色） ===== */
.mom-inter-msg-overlay {
    position: fixed; top: 0; left: 50%; bottom: 0; width: 100%; max-width: 480px;
    transform: translateX(calc(-50% + 100%));
    transition: transform 0.26s cubic-bezier(0.22,0.61,0.36,1);
    background: var(--bg-primary); z-index: 240;
    display: flex; flex-direction: column; will-change: transform;
    padding-top: var(--safe-top);
}
.mom-inter-msg-overlay.mom-inter-open { transform: translateX(-50%); animation: momInterSlideIn 0.26s cubic-bezier(0.22,0.61,0.36,1) both; }
@keyframes momInterSlideIn { from { transform: translateX(calc(-50% + 100%)); } to { transform: translateX(-50%); } }
.mom-inter-msg-overlay.mom-inter-close { animation: momInterSlideOut 0.22s ease-in forwards; }
@keyframes momInterSlideOut { from { transform: translateX(-50%); } to { transform: translateX(calc(-50% + 100%)); } }
.mom-inter-panel { display: flex; flex-direction: column; height: 100%; overflow: hidden; }
.mom-inter-header {
    display: grid; grid-template-columns: 44px 1fr 44px; align-items: center;
    padding: 12px 14px; background: var(--surface-solid);
    border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.mom-inter-back { background: none; border: none; padding: 4px; display: flex; align-items: center; justify-self: start; color: var(--text-primary); cursor: pointer; }
.mom-inter-title { text-align: center; font-size: 16px; font-weight: 600; font-family: var(--font-serif); color: var(--text-primary); }
.mom-inter-spacer { width: 28px; justify-self: end; }
/* ★ 2028-09：底部留白统一写 calc(24px + var(--safe-bottom))，与同文件的 #mom-detail-full-scroll
   以及全站滚动容器口径一致（安卓该变量恒 0，零影响；iOS 不被 Home 条盖住最后一条）。 */
.mom-inter-list { flex: 1; overflow-y: auto; padding: 0 0 calc(24px + var(--safe-bottom)); scroll-behavior: smooth; background: var(--bg-primary); }

/* 单条：头像 | 名称+时间+动作 | 右侧朋友圈内容盒；行与行细分隔线 */
.mom-inter-item {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 12px 16px; cursor: pointer;
    transition: background 0.12s ease;
    border-bottom: 1px solid var(--border);
    background: var(--bg-primary);
}
.mom-inter-item:active { background: var(--surface); }
.mom-inter-item:last-child { border-bottom: none; }
.mom-inter-item-avatar {
    width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
    background: var(--surface-solid); display: flex; align-items: center; justify-content: center;
}
.mom-inter-item-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mom-inter-item-avatar .mom-msgbox-avatar-fallback { font-size: 15px; }
.mom-inter-item-body { flex: 1; min-width: 0; }
.mom-inter-item-head { display: flex; align-items: baseline; gap: 8px; }
.mom-inter-item-name { font-size: 14px; font-weight: 600; color: var(--text-primary); font-family: var(--font-serif); }
.mom-inter-item-time { font-size: 12px; color: var(--text-muted); }
.mom-inter-act { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text-secondary); margin-top: 6px; }
.mom-inter-act svg { flex-shrink: 0; }
/* 右侧朋友圈内容盒（主题色卡片，文字/缩略图） */
.mom-inter-post {
    flex-shrink: 0; width: 112px; max-width: 40%;
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: 8px; padding: 6px; overflow: hidden;
    display: flex; flex-direction: column; gap: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.mom-inter-post-thumb { width: 100%; height: 56px; border-radius: 5px; overflow: hidden; }
.mom-inter-post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mom-inter-post-text { font-size: 12px; color: var(--text-secondary); line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }

/* 「浏览更多 / 全部互动消息」——放在滚动列表末尾，紧跟最后一条，下方留一点间距 */
.mom-inter-end, .mom-inter-more {
    text-align: center; padding: 16px 16px 8px; font-size: 13px; color: var(--text-muted);
}
.mom-inter-more { color: var(--rose); cursor: pointer; }
.mom-inter-more:active { opacity: 0.6; }
.mom-inter-sentinel { height: 1px; }

[data-theme-mode="dark"] .mom-msgbox { background: rgba(255,255,255,0.08); }
[data-theme-mode="dark"] .mom-msgbox:active { background: rgba(255,255,255,0.14); }
[data-theme-mode="dark"] .mom-msgbox-avatar { background: rgba(255,255,255,0.12); }
[data-theme-mode="dark"] .mom-inter-item:active { background: rgba(255,255,255,0.04); }
[data-theme-mode="dark"] .mom-inter-item-avatar { background: var(--surface-solid); }
[data-theme-mode="dark"] .mom-inter-post { box-shadow: 0 1px 4px rgba(0,0,0,0.2); }
