/* ====== 情侣账号模块样式 (styles-couple-account.css) ======
   设计规范：黑白灰 · 圆角 · 无渐变 · 无背景色 · SVG图标
   新增：晾衣绳夹子照片墙 · 一起写日记发送按钮 · 联系人主动性UI */

/* ===== 底部Tab导航 ===== */
.ca-page { display:flex; flex-direction:column; height:100%; background:#fff; }
.ca-body { flex:1; overflow-y:auto; -webkit-overflow-scrolling:touch; }
.ca-tab-bar {
    display:flex; border-top:1px solid #e5e5e5; background:#fff;
    padding:6px 0 0px; flex-shrink:0;
}
.ca-tab {
    flex:1; display:flex; flex-direction:column; align-items:center;
    gap:3px; padding:6px 0; cursor:pointer; color:#999;
    transition: color 0.2s;
}
.ca-tab.active { color:#000; }
.ca-tab svg { width:22px; height:22px; stroke:currentColor; fill:none; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.ca-tab.active svg { stroke-width:2.2; }
.ca-tab-label { font-size:10px; }

/* ===== 通用顶栏 ===== */
.ca-top-bar {
    display:flex; align-items:center; justify-content:space-between;
    padding:12px 16px; border-bottom:1px solid #f0f0f0;
}
.ca-top-bar .ca-back { width:28px; cursor:pointer; color:#333; }
.ca-top-bar .ca-back svg { width:20px; height:20px; stroke:#333; fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.ca-top-bar .ca-title { font-size:16px; font-weight:600; color:#111; }
.ca-top-bar .ca-actions { display:flex; gap:14px; align-items:center; }
.ca-top-bar .ca-actions svg { width:20px; height:20px; stroke:#555; fill:none; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; cursor:pointer; }
.ca-top-bar .ca-actions svg:active { stroke:#000; }

/* ===== 通用按钮 ===== */
.ca-btn {
    display:inline-flex; align-items:center; gap:6px;
    padding:8px 16px; border-radius:20px; font-size:13px;
    border:1px solid #ddd; background:#fff; color:#333; cursor:pointer;
}
.ca-btn:active { background:#f5f5f5; }
.ca-btn svg { width:14px; height:14px; stroke:currentColor; fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.ca-btn.primary { background:#111; color:#fff; border-color:#111; }
.ca-btn.primary:active { background:#333; }
.ca-btn.primary svg { stroke:#fff; }
.ca-btn.sm { padding:5px 12px; font-size:12px; }
.ca-btn.sm svg { width:12px; height:12px; }

/* ===== 1. 照片墙 - 晾衣绳夹子样式 ===== */
.pw-wrap { background:#fff; }
.pw-stat { text-align:center; padding:20px 16px 12px; }
.pw-stat-num { font-size:28px; font-weight:700; color:#111; }
.pw-stat-label { font-size:12px; color:#999; margin-top:2px; }
.pw-toolbar {
    display:flex; gap:8px; padding:8px 16px 12px; justify-content:flex-end;
    flex-wrap:wrap;
}

/* 晾衣绳容器 */
.pw-clothesline {
    padding:10px 8px 20px;
}

/* 每一行绳子 */
.pw-rope-row {
    position:relative;
    margin-bottom:30px;
    min-height:160px;
}

/* 绳子本体 */
.pw-rope {
    position:absolute;
    top:0;
    left:5%;
    right:5%;
    height:2px;
    background:#bbb;
    border-radius:1px;
    z-index:1;
}
.pw-rope::before,
.pw-rope::after {
    content:'';
    position:absolute;
    top:-3px;
    width:8px;
    height:8px;
    border-radius:50%;
    background:#999;
}
.pw-rope::before { left:0; }
.pw-rope::after { right:0; }

/* 绳子上挂的照片区域 */
.pw-rope-photos {
    display:flex;
    justify-content:center;
    gap:16px;
    padding:0 12px;
    position:relative;
    z-index:2;
}

/* 悬挂的照片 */
/* [FIX-照片过小] 原 flex:0 0 auto 导致宽度依赖图片原始尺寸，小图/生成图会显示得极小。
   改为固定占行宽30%，无论图片原始尺寸多大都撑满格子。 */
.pw-hanging-photo {
    position:relative;
    padding-top:20px;
    cursor:pointer;
    transition:transform 0.3s ease;
    flex:0 0 30%;
    width:30%;
    max-width:30%;
    min-width:0;
}
.pw-hanging-photo:hover {
    filter:brightness(1.05);
}
.pw-hanging-photo:active {
    transform:scale(0.95) !important;
}

/* 夹子 */
.pw-clip {
    position:absolute;
    top:6px;
    left:50%;
    transform:translateX(-50%);
    width:16px;
    height:22px;
    z-index:3;
}
.pw-clip::before {
    content:'';
    position:absolute;
    top:0;
    left:50%;
    transform:translateX(-50%);
    width:14px;
    height:8px;
    background:#888;
    border-radius:3px 3px 0 0;
    border:1px solid #777;
}
.pw-clip::after {
    content:'';
    position:absolute;
    top:7px;
    left:50%;
    transform:translateX(-50%);
    width:10px;
    height:14px;
    background:#999;
    border-radius:0 0 2px 2px;
    border:1px solid #888;
    border-top:none;
}

/* 夹子到绳子的线 */
.pw-clip-string {
    position:absolute;
    top:0;
    left:50%;
    width:1px;
    height:14px;
    background:#aaa;
    z-index:2;
}

/* 照片本体(带白边框like拍立得) */
.pw-photo-frame {
    background:#fff;
    border:1px solid #e0e0e0;
    padding:6px 6px 20px 6px;
    border-radius:2px;
    box-shadow:0 2px 8px rgba(0,0,0,0.1);
    position:relative;
    overflow:hidden;
}
.pw-photo-frame img {
    width:100%;
    aspect-ratio:1;
    object-fit:cover;
    display:block;
    border-radius:1px;
}

/* 照片上的标签 */
.pw-photo-tag {
    position:absolute;
    bottom:3px;
    left:6px;
    font-size:9px;
    color:#999;
    max-width:90%;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

/* 照片删除按钮 */
.pw-photo-del {
    position:absolute;
    top:2px;
    right:2px;
    width:18px;
    height:18px;
    border-radius:50%;
    background:rgba(0,0,0,0.5);
    display:none;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    z-index:5;
}
.pw-photo-del svg {
    width:10px;
    height:10px;
    stroke:#fff;
    fill:none;
    stroke-width:2.5;
    stroke-linecap:round;
}
.pw-hanging-photo:hover .pw-photo-del {
    display:flex;
}

/* 照片预览 */
.pw-preview {
    position:fixed; top:0; left:0; right:0; bottom:0;
    background:rgba(0,0,0,0.95); z-index:999;
    display:none; flex-direction:column; align-items:center; justify-content:center;
}
.pw-preview.show { display:flex; }
.pw-preview-close {
    position:absolute; top:14px; right:14px; cursor:pointer; z-index:1000;
}
.pw-preview-close svg { width:24px; height:24px; stroke:#fff; fill:none; stroke-width:2; stroke-linecap:round; }
.pw-preview img.main { max-width:95%; max-height:70vh; object-fit:contain; border-radius:6px; }
.pw-preview-meta { color:#aaa; text-align:center; margin-top:14px; font-size:13px; }
.pw-preview-meta .name { color:#fff; font-weight:500; }
.pw-preview-meta .cap { color:#ccc; margin-top:6px; font-size:12px; }
.pw-preview-btns { display:flex; gap:12px; margin-top:16px; flex-wrap:wrap; justify-content:center; }
.pw-preview-btn {
    padding:8px 20px; border-radius:20px; font-size:13px;
    border:1px solid rgba(255,255,255,0.25); background:transparent; color:#fff; cursor:pointer;
    display:flex; align-items:center; gap:6px;
}
.pw-preview-btn:active { background:rgba(255,255,255,0.1); }
.pw-preview-btn svg { width:14px; height:14px; stroke:#fff; fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.pw-preview-btn.del { border-color:rgba(255,80,80,0.5); color:#ff6b6b; }
.pw-preview-btn.del svg { stroke:#ff6b6b; }

.pw-empty { text-align:center; padding:60px 20px; color:#bbb; }
.pw-empty svg { width:48px; height:48px; stroke:#ddd; fill:none; stroke-width:1.2; margin-bottom:14px; }
.pw-empty p { font-size:13px; line-height:1.6; }

/* ===== 2. 情侣日记 ===== */
.dy-wrap { background:#fff; }
.dy-list { padding:0; }
.dy-card { border-bottom:1px solid #f0f0f0; }
.dy-card-head { display:flex; align-items:center; gap:10px; padding:14px 16px 8px; }
.dy-card-avatar { width:34px; height:34px; border-radius:50%; object-fit:cover; flex-shrink:0; }
.dy-card-info { flex:1; }
.dy-card-author { font-size:14px; font-weight:600; color:#111; display:flex; align-items:center; gap:6px; }
.dy-card-date { font-size:11px; color:#aaa; margin-top:1px; }
.dy-collab-tag {
    display:inline-flex; align-items:center; gap:3px;
    font-size:10px; color:#888; border:1px solid #ddd;
    padding:1px 6px; border-radius:8px;
}
.dy-collab-tag svg { width:10px; height:10px; stroke:#888; fill:none; stroke-width:2; }
.dy-card-body { padding:0 16px 12px; font-size:14px; line-height:1.75; color:#333; white-space:pre-wrap; word-break:break-word; position:relative; min-height:60px; }
.dy-section { margin-bottom:6px; padding:10px 12px; border-radius:10px; }
.dy-section.user { background:#fafafa; border-left:2px solid #333; }
.dy-section.partner { background:#fafafa; border-left:2px solid #aaa; }
.dy-section-name { font-size:11px; font-weight:600; color:#999; margin-bottom:3px; }

/* ========== 便利贴 - 浮层式设计 ========== */
.dy-stickers {
    display: contents;
}
.dy-card-body {
    position: relative;
    min-height: 80px;
}
.dy-sticker {
    position: absolute;
    padding: 14px 12px 10px;
    width: 125px;
    font-size: 12px;
    color: #3e2723;
    line-height: 1.6;
    border-radius: 4px;
    word-break: break-word;
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    z-index: 5;
    transition: transform 0.25s cubic-bezier(.4,0,.2,1), box-shadow 0.25s cubic-bezier(.4,0,.2,1);
    /* 柔和纸质纹理 */
    background:
        repeating-linear-gradient(0deg, transparent, transparent 20px, rgba(0,0,0,0.015) 20px, rgba(0,0,0,0.015) 21px),
        linear-gradient(155deg, var(--stk-from, #fffde7) 0%, var(--stk-to, #fff9c4) 100%);
    /* 浮层阴影 - 更明显的悬浮感 */
    box-shadow:
        0 6px 20px rgba(0,0,0,0.1),
        0 2px 6px rgba(0,0,0,0.06);
    --stk-from: #fffde7;
    --stk-to: #fff9c4;
}
/* 浮层定位由 JS 内联样式控制（散落排布 + 可拖动），此处不再用 nth-child 固定定位 */
/* 图钉装饰 */
.dy-sticker::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ff8a80, #d32f2f);
    box-shadow: 0 1px 2px rgba(0,0,0,0.2), inset 0 1px 1px rgba(255,255,255,0.3);
    z-index: 2;
}
.dy-sticker:nth-child(even)::before {
    background: radial-gradient(circle at 35% 35%, #81d4fa, #1976d2);
}
.dy-sticker:nth-child(3n)::before {
    background: radial-gradient(circle at 35% 35%, #a5d6a7, #388e3c);
}
/* 6种清新便利贴配色 */
.dy-sticker:nth-child(6n+1) {
    --stk-from: #fffde7; --stk-to: #fff9c4;
}
.dy-sticker:nth-child(6n+2) {
    --stk-from: #fce4ec; --stk-to: #f8bbd0;
}
.dy-sticker:nth-child(6n+3) {
    --stk-from: #e8f5e9; --stk-to: #c8e6c9;
}
.dy-sticker:nth-child(6n+4) {
    --stk-from: #e3f2fd; --stk-to: #bbdefb;
}
.dy-sticker:nth-child(6n+5) {
    --stk-from: #f3e5f5; --stk-to: #e1bee7;
}
.dy-sticker:nth-child(6n+6) {
    --stk-from: #fff3e0; --stk-to: #ffe0b2;
}
/* 底部微翘效果 */
.dy-sticker::after {
    content: '';
    position: absolute;
    bottom: 0; left: 6px; right: 6px;
    height: 6px;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.03));
    border-radius: 0 0 3px 3px;
    pointer-events: none;
}
/* 点击样式 */
.dy-sticker:active {
    transform: rotate(0deg) scale(1.05) !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.14), 0 3px 8px rgba(0,0,0,0.08);
    z-index: 100;
}
.dy-sticker-who {
    font-size: 10px;
    font-weight: 600;
    color: rgba(0,0,0,0.38);
    margin-bottom: 4px;
    display: block;
    letter-spacing: 0.4px;
}
.dy-sticker-text {
    pointer-events: none;
    word-break: break-word;
    font-size: 12px;
    line-height: 1.65;
    color: #4e342e;
    display: block;
}
/* 操作按钮组 */
.dy-sticker-actions {
    position: absolute;
    top: -8px;
    right: -8px;
    display: flex;
    gap: 3px;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 5;
}
.dy-sticker:hover .dy-sticker-actions,
.dy-sticker:active .dy-sticker-actions { opacity: 1; }
@media (hover: none) {
    .dy-sticker-actions { opacity: 0.7; }
}
.dy-sticker-edit {
    width: 20px; height: 20px; border-radius: 50%;
    background: rgba(60,60,60,0.75);
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
    border: 1px solid rgba(255,255,255,0.15);
    transition: transform 0.15s;
}
.dy-sticker-edit:active { transform: scale(0.88); }
.dy-sticker-edit svg { width: 10px; height: 10px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dy-sticker-rm {
    width: 20px; height: 20px;
    border-radius: 50%;
    background: rgba(180,50,50,0.75);
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
    border: 1px solid rgba(255,255,255,0.15);
    transition: transform 0.15s;
}
.dy-sticker-rm:active { transform: scale(0.88); }
.dy-sticker-rm svg { width: 9px; height: 9px; stroke: #fff; fill: none; stroke-width: 2.5; stroke-linecap: round; }

/* 日记操作栏 */
.dy-card-acts { display:flex; gap:12px; padding:8px 16px 12px; flex-wrap:wrap; }
.dy-act {
    display:flex; align-items:center; gap:4px; font-size:12px;
    color:#999; cursor:pointer;
}
.dy-act:active { color:#333; }
.dy-act svg { width:14px; height:14px; stroke:currentColor; fill:none; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }

/* 日记编辑器 - 屏幕中间弹窗 */
.dy-editor-overlay {
    position:fixed; top:0; left:0; right:0; bottom:0;
    background:rgba(0,0,0,0.45); z-index:100;
    display:none; align-items:center; justify-content:center;
}
.dy-editor-overlay.show { display:flex; }
.dy-editor-sheet {
    background:#fff; border-radius:16px; width:92%; max-width:420px;
    max-height:80vh; padding:0 20px 20px; overflow-y:auto;
    box-shadow:0 8px 32px rgba(0,0,0,0.18);
}
/* 顶部header：左关闭 中标题 右保存 */
.dy-editor-header {
    display:flex; align-items:center; justify-content:space-between;
    padding:16px 0 10px; position:sticky; top:0; background:#fff; z-index:2;
    border-bottom:1px solid #f0f0f0; margin-bottom:14px;
}
.dy-editor-header-left {
    width:32px; height:32px; display:flex; align-items:center; justify-content:center;
    cursor:pointer; border-radius:50%; color:#666; flex-shrink:0;
}
.dy-editor-header-left:active { background:#f0f0f0; }
.dy-editor-header-left svg { width:18px; height:18px; }
.dy-editor-title {
    font-size:16px; font-weight:600; color:#111; text-align:center;
    flex:1; margin:0; line-height:32px;
}
.dy-editor-save-top {
    padding:6px 16px; border-radius:8px; border:none;
    background:#111; color:#fff; font-size:13px; font-weight:600;
    cursor:pointer; flex-shrink:0; line-height:20px;
}
.dy-editor-save-top:active { opacity:0.8; }
.dy-editor-tabs { display:flex; gap:8px; margin-bottom:12px; }
.dy-editor-tab {
    flex:1; padding:8px; border-radius:10px; text-align:center;
    font-size:13px; cursor:pointer; border:1px solid #e5e5e5; color:#666; background:#fff;
}
.dy-editor-tab.active { border-color:#111; color:#111; font-weight:600; }
.dy-editor-ta {
    width:100%; border:1px solid #e5e5e5; border-radius:10px;
    padding:12px; font-size:14px; line-height:1.7; resize:none;
    outline:none; min-height:140px; font-family:inherit; color:#333; box-sizing:border-box;
}
.dy-editor-ta:focus { border-color:#333; }
.dy-counter { text-align:right; font-size:11px; color:#bbb; margin-top:4px; }
.dy-counter.over { color:#e53935; }

/* 一起写日记 - 发送按钮行 */
.dy-collab-send-row {
    display:flex;
    justify-content:flex-end;
    margin:8px 0;
}
.dy-collab-send-btn {
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:8px 18px;
    border-radius:20px;
    background:#111;
    color:#fff;
    font-size:13px;
    font-weight:500;
    border:none;
    cursor:pointer;
    transition:background 0.2s;
}
.dy-collab-send-btn:active { background:#333; }
.dy-collab-send-btn svg {
    width:14px;
    height:14px;
    stroke:#fff;
    fill:none;
    stroke-width:2;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.dy-empty { text-align:center; padding:60px 20px; color:#bbb; }
.dy-empty svg { width:48px; height:48px; stroke:#ddd; fill:none; stroke-width:1.2; margin-bottom:14px; }

/* ===== 3. 社交账号 ===== */
.csn-wrap { background:#fff; }

/* 账号头部 */
.csn-profile { padding:24px 16px 16px; border-bottom:1px solid #f0f0f0; }
.csn-profile-row { display:flex; align-items:center; gap:14px; }
.csn-profile-av { width:60px; height:60px; border-radius:50%; object-fit:cover; flex-shrink:0; border:1px solid #eee; }
.csn-profile-text { flex:1; }
.csn-profile-name { font-size:17px; font-weight:700; color:#111; }
.csn-profile-handle { font-size:13px; color:#999; margin-top:1px; }
.csn-profile-bio { font-size:12px; color:#666; margin-top:6px; line-height:1.4; }
.csn-profile-stats { display:flex; gap:20px; margin-top:12px; }
.csn-profile-stat { font-size:12px; color:#999; }
.csn-profile-stat strong { color:#111; font-weight:600; }
.csn-profile-edit {
    padding:5px 14px; border-radius:16px; border:1px solid #ddd;
    background:#fff; font-size:12px; color:#333; cursor:pointer; white-space:nowrap;
}

/* 帖子 */
.csn-feed { }
.csn-post { padding:14px 16px; border-bottom:1px solid #f0f0f0; }
.csn-post-head { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.csn-post-av { width:40px; height:40px; border-radius:50%; object-fit:cover; flex-shrink:0; }
.csn-post-meta { flex:1; }
.csn-post-name { font-size:14px; font-weight:600; color:#111; }
.csn-post-sub { font-size:12px; color:#aaa; display:flex; align-items:center; gap:6px; margin-top:1px; }
.csn-who-tag {
    display:inline-flex; align-items:center; gap:2px;
    font-size:10px; padding:1px 5px; border-radius:6px;
    border:1px solid #ddd; color:#888;
}
.csn-post-more { cursor:pointer; padding:4px; }
.csn-post-more svg { width:18px; height:18px; stroke:#999; fill:none; stroke-width:2; }
.csn-post-content { font-size:14px; line-height:1.7; color:#222; margin-bottom:10px; white-space:pre-wrap; word-break:break-word; }

/* 帖子图片 */
.csn-post-imgs { display:grid; gap:3px; margin-bottom:10px; border-radius:10px; overflow:hidden; }
.csn-post-imgs.c1 { grid-template-columns:1fr; }
.csn-post-imgs.c2 { grid-template-columns:1fr 1fr; }
.csn-post-imgs.c3 { grid-template-columns:1fr 1fr; }
.csn-post-imgs.c4 { grid-template-columns:1fr 1fr; }
.csn-post-imgs img { width:100%; aspect-ratio:1; object-fit:cover; cursor:pointer; }
.csn-post-imgs.c1 img { aspect-ratio:16/9; max-height:280px; }

/* 帖子统计 */
.csn-post-stats {
    display:flex; gap:16px; padding:6px 0; font-size:12px; color:#aaa;
    border-bottom:1px solid #f5f5f5;
}
.csn-post-stats strong { color:#555; }

/* 帖子操作按钮 */
.csn-post-acts { display:flex; justify-content:space-around; padding:8px 0; }
.csn-post-act {
    display:flex; align-items:center; gap:5px; font-size:13px;
    color:#888; cursor:pointer; padding:6px 14px; border-radius:16px;
}
.csn-post-act:active { background:#f5f5f5; }
.csn-post-act svg { width:16px; height:16px; stroke:currentColor; fill:none; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.csn-post-act.liked { color:#e53935; }
.csn-post-act.liked svg { fill:#e53935; stroke:#e53935; }

/* 评论 */
.csn-comments { padding:6px 0; }
.csn-cmt { display:flex; gap:8px; padding:8px 0; }
.csn-cmt-av { width:30px; height:30px; border-radius:50%; object-fit:cover; flex-shrink:0; }
.csn-cmt-body { flex:1; }
.csn-cmt-name { font-size:12px; font-weight:600; color:#333; display:flex; align-items:center; gap:5px; }
.csn-cmt-time { font-size:10px; color:#ccc; font-weight:400; }
.csn-cmt-text { font-size:13px; color:#444; line-height:1.5; margin-top:2px; }
.csn-cmt-acts { display:flex; gap:12px; margin-top:4px; font-size:11px; color:#aaa; }
.csn-cmt-acts span { cursor:pointer; }
.csn-cmt-acts span:active { color:#333; }
.csn-cmt-del { color:#e57373 !important; }
.csn-cmt-del:active { color:#c62828 !important; }
.csn-cmt-reply { margin-left:38px; }
.csn-cmt-reply .csn-cmt { padding:4px 0; }

/* 评论输入 */
.csn-cmt-input {
    display:flex; gap:8px; padding:10px 16px;
    border-top:1px solid #f0f0f0; background:#fff;
}
.csn-cmt-input input {
    flex:1; border:1px solid #e5e5e5; border-radius:20px;
    padding:8px 14px; font-size:13px; outline:none; box-sizing:border-box;
}
.csn-cmt-input input:focus { border-color:#333; }
.csn-cmt-input button {
    padding:8px 16px; border-radius:20px; border:none;
    background:#111; color:#fff; font-size:13px; cursor:pointer;
}

/* 网友标签 */
.csn-badge {
    font-size:9px; padding:1px 4px; border-radius:4px;
    border:1px solid #ddd; color:#999; margin-left:4px;
}

/* 发帖 */
.csn-compose-overlay {
    position:fixed; top:0; left:0; right:0; bottom:0;
    background:rgba(0,0,0,0.4); z-index:200;
    display:none; align-items:center; justify-content:center;
}
.csn-compose-overlay.show { display:flex; }
.csn-compose-sheet {
    background:#fff; border-radius:16px; width:calc(100% - 32px);
    max-width:480px; max-height:85vh; padding:20px; overflow-y:auto;
    box-shadow:0 8px 32px rgba(0,0,0,0.15);
}
.csn-compose-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.csn-compose-cancel { font-size:14px; color:#999; cursor:pointer; }
.csn-compose-title { font-size:15px; font-weight:600; color:#111; }
.csn-compose-submit {
    padding:6px 18px; border-radius:16px; border:none;
    background:#111; color:#fff; font-size:13px; font-weight:600; cursor:pointer;
}
.csn-compose-submit:disabled { background:#ddd; color:#999; }
.csn-compose-who { display:flex; gap:8px; margin-bottom:12px; }
.csn-compose-who-btn {
    padding:6px 14px; border-radius:16px; font-size:12px;
    border:1px solid #e0e0e0; background:#fff; color:#888; cursor:pointer;
}
.csn-compose-who-btn.active { border-color:#111; color:#111; font-weight:600; }
.csn-compose-ta {
    width:100%; border:none; outline:none; font-size:14px;
    line-height:1.7; resize:none; min-height:120px;
    font-family:inherit; color:#333; box-sizing:border-box;
}
.csn-compose-ta::placeholder { color:#ccc; }
.csn-compose-imgs { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.csn-compose-img-item {
    position:relative; width:72px; height:72px; border-radius:8px;
    overflow:hidden; border:1px solid #eee;
}
.csn-compose-img-item img { width:100%; height:100%; object-fit:cover; }
.csn-compose-img-rm {
    position:absolute; top:2px; right:2px; width:18px; height:18px;
    border-radius:50%; background:rgba(0,0,0,0.5); display:flex;
    align-items:center; justify-content:center; cursor:pointer;
}
.csn-compose-img-rm svg { width:10px; height:10px; stroke:#fff; fill:none; stroke-width:2.5; stroke-linecap:round; }
.csn-compose-tools {
    display:flex; gap:16px; margin-top:14px; padding-top:14px;
    border-top:1px solid #f0f0f0;
}
.csn-compose-tool {
    display:flex; align-items:center; gap:5px; font-size:13px;
    color:#888; cursor:pointer;
}
.csn-compose-tool svg { width:18px; height:18px; stroke:currentColor; fill:none; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.csn-compose-tool:active { color:#333; }

/* FAB - [FIX-FAB可拖拽+弹性保护带] 支持触摸拖拽，bottom从保护带出发 */
.csn-fab-group {
    position:fixed; bottom:calc(var(--guard-bottom, 12px) + 50px); right:var(--guard-right, 18px); z-index:50;
    touch-action:none; user-select:none; -webkit-user-select:none;
    display:flex; flex-direction:column; align-items:flex-end; gap:10px;
}
.csn-fab {
    width:48px; height:48px; border-radius:50%;
    background:#111; color:#fff; border:none;
    display:flex; align-items:center; justify-content:center;
    box-shadow:0 2px 10px rgba(0,0,0,0.15); cursor:pointer;
}
.csn-fab.secondary {
    width:auto; height:36px; border-radius:18px; padding:0 14px;
    font-size:12px; gap:4px; background:#444;
}
.csn-fab:active { background:#333; }
.csn-fab svg { width:22px; height:22px; stroke:#fff; fill:none; stroke-width:2; stroke-linecap:round; }
.csn-fab.secondary svg { width:14px; height:14px; }

/* 帖子菜单 */
.csn-menu-overlay {
    position:fixed; top:0; left:0; right:0; bottom:0;
    background:rgba(0,0,0,0.35); z-index:150;
    display:none; align-items:flex-end;
}
.csn-menu-overlay.show { display:flex; }
.csn-menu {
    background:#fff; border-radius:14px 14px 0 0; width:100%;
    padding:12px 0 0px;
}
.csn-menu-item {
    padding:14px 20px; font-size:14px; color:#333; cursor:pointer;
    display:flex; align-items:center; gap:10px;
}
.csn-menu-item:active { background:#f5f5f5; }
.csn-menu-item svg { width:18px; height:18px; stroke:currentColor; fill:none; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.csn-menu-item.danger { color:#e53935; }
.csn-menu-cancel { text-align:center; padding:14px; font-size:14px; color:#aaa; cursor:pointer; border-top:1px solid #f0f0f0; }

/* 账号设置弹窗 */
.csn-settings-overlay {
    position:fixed; top:0; left:0; right:0; bottom:0;
    background:rgba(0,0,0,0.4); z-index:200;
    display:none; align-items:center; justify-content:center;
}
.csn-settings-overlay.show { display:flex; }
.csn-settings-card {
    background:#fff; border-radius:16px; width:85%; max-width:340px;
    padding:24px 20px;
}
.csn-settings-card h3 { font-size:16px; font-weight:600; margin:0 0 16px; text-align:center; color:#111; }
.csn-settings-field { margin-bottom:12px; }
.csn-settings-field label { font-size:11px; color:#aaa; display:block; margin-bottom:5px; }
.csn-settings-field input {
    width:100%; border:1px solid #e5e5e5; border-radius:10px;
    padding:10px 12px; font-size:13px; outline:none; box-sizing:border-box; color:#333;
}
.csn-settings-field input:focus { border-color:#333; }
.csn-settings-av-row { display:flex; align-items:center; gap:12px; margin-bottom:14px; }
.csn-settings-av-row img { width:48px; height:48px; border-radius:50%; object-fit:cover; border:1px solid #eee; }
.csn-settings-av-row button {
    padding:6px 12px; border-radius:8px; border:1px solid #ddd;
    background:#fff; font-size:12px; color:#666; cursor:pointer;
}
.csn-settings-btns { display:flex; gap:10px; margin-top:14px; }
.csn-settings-btns button {
    flex:1; padding:10px; border-radius:10px; border:none;
    font-size:13px; font-weight:600; cursor:pointer;
}
.csn-settings-btns .s-cancel { background:#f5f5f5; color:#666; }
.csn-settings-btns .s-save { background:#111; color:#fff; }
.csn-settings-name-btns { display:flex; gap:8px; margin-bottom:4px; }
.csn-settings-name-btns button {
    flex:1; padding:7px; border:1px solid #ddd; border-radius:8px;
    background:#fff; cursor:pointer; font-size:12px; color:#666;
    display:flex; align-items:center; justify-content:center; gap:4px;
}
.csn-settings-name-btns button svg { width:12px; height:12px; stroke:currentColor; fill:none; stroke-width:2; }

/* AI loading */
.csn-ai-dots { display:flex; align-items:center; gap:6px; padding:10px 16px; color:#aaa; font-size:12px; }
.csn-ai-dots .dots span {
    display:inline-block; width:4px; height:4px; border-radius:50%;
    background:#ccc; margin:0 1px; animation:caDot 1.2s infinite;
}
.csn-ai-dots .dots span:nth-child(2) { animation-delay:0.2s; }
.csn-ai-dots .dots span:nth-child(3) { animation-delay:0.4s; }
@keyframes caDot { 0%,80%,100%{opacity:0.3;transform:scale(0.7)}40%{opacity:1;transform:scale(1)} }

/* AI 生成评论按钮 */
.csn-gen-btn {
    display:inline-flex; align-items:center; gap:5px;
    padding:6px 14px; border-radius:16px; margin:6px 0;
    background:#f5f5f5; color:#888; font-size:12px; border:none; cursor:pointer;
}
.csn-gen-btn:active { background:#eee; }
.csn-gen-btn:disabled { opacity:0.5; cursor:not-allowed; }
.csn-gen-btn svg { width:14px; height:14px; stroke:currentColor; fill:none; stroke-width:1.8; }
.csn-gen-btn .spin { animation:caSpin 1s linear infinite; }
@keyframes caSpin { from{transform:rotate(0)}to{transform:rotate(360deg)} }

/* 空状态 */
.csn-empty { text-align:center; padding:60px 20px; color:#bbb; }
.csn-empty svg { width:48px; height:48px; stroke:#ddd; fill:none; stroke-width:1.2; margin-bottom:14px; }

/* 顶栏设置按钮 */
.ca-settings-btn {
    width:28px; height:28px; display:flex; align-items:center; justify-content:center;
    cursor:pointer; opacity:0.6; transition:opacity 0.2s;
}
.ca-settings-btn:active { opacity:1; }
.ca-settings-btn svg { width:18px; height:18px; stroke:#333; fill:none; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }

/* 自动行为设置面板 */
.ca-autoset-overlay {
    position:fixed; top:0; left:0; right:0; bottom:0;
    background:rgba(0,0,0,0.4); z-index:200;
    display:none; align-items:center; justify-content:center;
}
.ca-autoset-overlay.show { display:flex; }
.ca-autoset-card {
    background:#fff; border-radius:16px; width:90%; max-width:360px;
    padding:24px 20px; box-shadow:0 8px 30px rgba(0,0,0,0.15);
}
.ca-autoset-title {
    font-size:16px; font-weight:600; color:#111; margin-bottom:4px;
    display:flex; align-items:center; gap:6px;
}
.ca-autoset-title svg { width:18px; height:18px; stroke:#333; fill:none; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.ca-autoset-desc { font-size:12px; color:#999; margin-bottom:16px; }
.ca-autoset-item {
    padding:10px 0; border-bottom:1px solid #f0f0f0;
}
.ca-autoset-item label {
    display:flex; align-items:center; gap:8px;
    font-size:14px; color:#333; cursor:pointer;
}
.ca-autoset-item input[type="checkbox"] {
    width:18px; height:18px; accent-color:#111; cursor:pointer;
}
.ca-autoset-hint { display:block; font-size:11px; color:#aaa; margin-top:2px; padding-left:26px; }
.ca-autoset-freq { margin-top:16px; }
.ca-autoset-freq-label { font-size:13px; color:#555; margin-bottom:8px; font-weight:500; }
.ca-autoset-freq-btns { display:flex; gap:8px; }
.ca-autoset-freq-btn {
    flex:1; padding:8px 0; text-align:center; border-radius:8px;
    font-size:13px; color:#666; background:#f5f5f5; border:1.5px solid transparent;
    cursor:pointer; transition:all 0.2s;
}
.ca-autoset-freq-btn.active { background:#111; color:#fff; border-color:#111; }
.ca-autoset-freq-btn:active { opacity:0.7; }
.ca-autoset-freq-hint { font-size:11px; color:#aaa; margin-top:6px; text-align:center; }
.ca-autoset-btns { display:flex; gap:10px; margin-top:20px; }
.ca-autoset-btn {
    flex:1; padding:10px 0; border-radius:10px; font-size:14px;
    border:none; cursor:pointer; text-align:center;
}
.ca-autoset-btn.cancel { background:#f0f0f0; color:#666; }
.ca-autoset-btn.save { background:#111; color:#fff; }
.ca-autoset-btn:active { opacity:0.7; }

/* 性别设定 */
.csn-settings-gender-section { margin-bottom:14px; }
.csn-settings-gender-title {
    font-size:12px; color:#666; display:block; margin-bottom:8px; font-weight:500;
}
.csn-settings-gender-hint { font-size:10px; color:#aaa; font-weight:400; }
.csn-settings-gender-row { display:flex; flex-direction:column; gap:10px; }
.csn-settings-gender-item {
    display:flex; align-items:center; justify-content:space-between;
    padding:8px 12px; background:#f8f8f8; border-radius:10px;
}
.csn-settings-gender-name {
    font-size:13px; color:#333; font-weight:500;
    max-width:45%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.csn-settings-gender-btns {
    display:flex; gap:6px;
}
.csn-settings-gender-btns button {
    padding:5px 14px; border-radius:16px; border:1.5px solid #e0e0e0;
    background:#fff; color:#888; font-size:12px; cursor:pointer;
    transition:all 0.2s;
}
.csn-settings-gender-btns button:active { opacity:0.7; }
.csn-settings-gender-btns button.active {
    background:#111; color:#fff; border-color:#111;
}
