/* 情侣空间 · 恋爱手帐（框架 UI，参考手机 QQ 空间动态：顶栏 + 封面名片 + 发新鲜事 + 动态流） */

.cs-lj-overlay {
    position: absolute;
    inset: 0;
    z-index: 100210;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    background: #ebebeb;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
    box-sizing: border-box;
    min-height: 0;
}

html[data-appearance="dark"] .cs-lj-overlay {
    background: linear-gradient(180deg, #151518 0%, #1f2024 100%);
}

html[data-appearance="dark"] .cs-lj-header,
html[data-appearance="dark"] .cs-lj-section,
html[data-appearance="dark"] .cs-lj-feed-card,
html[data-appearance="dark"] .cs-lj-publisher,
html[data-appearance="dark"] .cs-lj-editor-sheet,
html[data-appearance="dark"] .cs-lj-stamp-panel {
    background: rgba(44, 44, 46, 0.94);
    color: #f5f5f7;
    border-color: rgba(255, 255, 255, 0.08);
}

html[data-appearance="dark"] .cs-lj-header-title,
html[data-appearance="dark"] .cs-lj-space-name,
html[data-appearance="dark"] .cs-lj-feed-name,
html[data-appearance="dark"] .cs-lj-section-title,
html[data-appearance="dark"] .cs-lj-composer-title {
    color: #f5f5f7;
}

html[data-appearance="dark"] .cs-lj-subtitle,
html[data-appearance="dark"] .cs-lj-feed-time,
html[data-appearance="dark"] .cs-lj-feed-text,
html[data-appearance="dark"] .cs-lj-empty-copy {
    color: rgba(235, 235, 245, 0.68);
}

html[data-appearance="dark"] .cs-lj-back,
html[data-appearance="dark"] .cs-lj-header--over-cover .cs-lj-back {
    background: rgba(58, 58, 60, 0.92);
    color: #f5f5f7;
}

.cs-lj-overlay--root {
    position: fixed;
    z-index: 12030;
}

.cs-lj-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.cs-lj-shell {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    box-sizing: border-box;
}

/* —— 顶栏：叠在封面之上，背景铺满顶部无断层 —— */
.cs-lj-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    min-height: 48px;
    flex-shrink: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(245, 245, 245, 0.98) 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.cs-lj-header--over-cover {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 4;
    margin: 0;
    border: none;
    box-shadow: none;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0.06) 55%, transparent 100%);
}

.cs-lj-header--over-cover .cs-lj-header-title {
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.cs-lj-back {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.85);
    color: #12b7f5;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.cs-lj-header--over-cover .cs-lj-back {
    background: rgba(255, 255, 255, 0.92);
    color: #333;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.cs-lj-back:active {
    opacity: 0.88;
}

.cs-lj-header-title {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: #333;
    letter-spacing: 0.02em;
}

.cs-lj-header-spacer {
    width: 40px;
    height: 40px;
}

/* —— 可滚动主体 —— */
.cs-lj-body {
    flex: 1;
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0;
    padding-bottom: 24px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.cs-lj-body::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

/* —— 封面顶到容器最上，标题栏浮于其上 —— */
.cs-lj-hero {
    position: relative;
    padding-bottom: 8px;
}

.cs-lj-cover-bg {
    position: relative;
    height: 188px;
    border-radius: 0 0 16px 16px;
    overflow: hidden;
    background: linear-gradient(135deg, #7ec8f5 0%, #b8a6ff 45%, #ffc8dd 100%);
    box-shadow: 0 8px 24px rgba(80, 120, 200, 0.12);
}

.cs-lj-cover-bg.has-image {
    background-size: cover;
    background-position: center;
}

.cs-lj-cover-tap {
    position: absolute;
    inset: 0;
    border: none;
    margin: 0;
    padding: 0;
    cursor: pointer;
    background: transparent;
    font-size: 0;
    color: transparent;
}

/* 名片行：左下拍立得头像（距屏左 15px）+ 右侧空间名（flex 收窄给头像让位） */
.cs-lj-card {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    margin: -40px 12px 0 15px;
    padding: 0 0 12px;
    position: relative;
    z-index: 2;
}

.cs-lj-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.cs-lj-avatar-hit {
    display: block;
    border: none;
    margin: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
    line-height: 0;
}

.cs-lj-avatar-hit [data-cs-lj-avatar-host] {
    display: block;
}

.cs-lj-avatar-hit:focus-visible {
    outline: 2px solid rgba(18, 183, 245, 0.65);
    outline-offset: 3px;
    border-radius: 20px;
}

/* 恋爱手帐：拍立得相纸 + 顶部胶带（与情侣列表/私密顶卡心形无关） */
.cs-lj-avatar-wrap .couple-space-heart-avatar {
    --avatar-size: 66px;
    width: calc(var(--avatar-size) * 1.08);
    height: calc(var(--avatar-size) * 1.32);
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.15));
}

.cs-lj-avatar-wrap .couple-space-heart-avatar::before {
    display: block;
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    width: 28px;
    height: 11px;
    border-radius: 3px;
    background: linear-gradient(180deg, rgba(232, 223, 185, 0.9) 0%, rgba(217, 206, 162, 0.72) 100%);
    box-shadow: 0 2px 5px rgba(140, 128, 89, 0.14);
    transform: translateX(-50%) rotate(6deg);
    z-index: 4;
}

.cs-lj-avatar-wrap .couple-space-heart-avatar-shell {
    clip-path: none;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(250, 248, 253, 0.97) 0%, rgba(238, 233, 243, 0.95) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), 0 0 0 1px rgba(218, 212, 228, 0.76);
    pointer-events: none;
}

.cs-lj-avatar-wrap .couple-space-heart-avatar-media {
    clip-path: none;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    inset: 8px 8px 14px;
    border-radius: 4px;
    box-shadow: inset 0 0 0 1px rgba(214, 207, 223, 0.78);
}

.cs-lj-avatar-wrap .couple-space-heart-avatar-fallback {
    clip-path: none;
    inset: 8px 8px 14px;
    border-radius: 4px;
}

.cs-lj-title-block {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    padding-bottom: 4px;
    overflow: hidden;
}

.cs-lj-space-title {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    text-align: left;
    border: none;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 15px;
    font-weight: 600;
    color: #222;
    line-height: 1.45;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.cs-lj-space-title:active {
    opacity: 0.92;
}

.cs-lj-title-hint {
    margin-top: 6px;
    font-size: 11px;
    color: #999;
    padding-left: 2px;
}

/* —— 发新鲜事 —— */
.cs-lj-composer-wrap {
    position: relative;
    z-index: 24;
    margin: 4px 12px 14px;
    padding: 12px 12px 10px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.cs-lj-composer-input {
    width: 100%;
    min-height: 72px;
    border: none;
    resize: none;
    font-size: 15px;
    line-height: 1.5;
    color: #333;
    background: transparent;
    outline: none;
    font-family: inherit;
}

.cs-lj-composer-input::placeholder {
    color: #bbb;
}

.cs-lj-composer-stamp-preview {
    display: none;
    margin-top: 10px;
}

.cs-lj-composer-stamp-preview.is-visible {
    display: block;
}

.cs-lj-composer-stamp-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 100%;
    padding: 8px 10px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f0f9ff 0%, #fff5f8 100%);
    border: 1px solid rgba(18, 183, 245, 0.22);
    box-sizing: border-box;
}

.cs-lj-composer-stamp-chip-img {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.cs-lj-composer-stamp-chip-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.cs-lj-composer-stamp-chip-label {
    font-size: 14px;
    font-weight: 600;
    color: #444;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cs-lj-composer-stamp-chip-remove {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.08);
    color: #555;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cs-lj-composer-stamp-chip-remove:active {
    background: rgba(0, 0, 0, 0.14);
}

.cs-lj-composer-media {
    display: none;
    margin-top: 10px;
}

.cs-lj-composer-media.is-visible {
    display: block;
}

.cs-lj-composer-media-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.cs-lj-composer-media-grid.is-count-1 {
    grid-template-columns: minmax(0, 1fr);
    max-width: 172px;
}

.cs-lj-composer-media-grid.is-count-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cs-lj-composer-media-item {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    background: #f5f7fb;
}

.cs-lj-composer-media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cs-lj-composer-media-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.58);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cs-lj-composer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
}

.cs-lj-composer-tools {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cs-lj-composer-mood {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 10px;
    background: #f5f5f5;
    color: #12b7f5;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cs-lj-composer-mood:active {
    background: #eaeaea;
}

.cs-lj-composer-mood.is-selected {
    background: #e3f6ff;
    box-shadow: 0 0 0 2px rgba(18, 183, 245, 0.35) inset;
}

.cs-lj-composer-mood-svg {
    width: 24px;
    height: 24px;
    pointer-events: none;
}

.cs-lj-composer-photo {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 10px;
    background: #f5f5f5;
    color: #12b7f5;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cs-lj-composer-photo:active {
    background: #eaeaea;
}

.cs-lj-composer-photo.has-media {
    background: #e3f6ff;
    box-shadow: 0 0 0 2px rgba(18, 183, 245, 0.28) inset;
}

.cs-lj-composer-photo svg {
    width: 22px;
    height: 22px;
    pointer-events: none;
}

.cs-lj-composer-send {
    padding: 8px 16px;
    border: none;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(180deg, #5ecfff 0%, #12b7f5 100%);
    cursor: pointer;
    opacity: 1;
    pointer-events: auto;
}

.cs-lj-composer-send.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

/* —— 动态流 —— */
.cs-lj-feed-head {
    margin: 4px 16px 8px;
    font-size: 13px;
    font-weight: 600;
    color: #888;
    letter-spacing: 0.04em;
}

.cs-lj-feed {
    margin: 0 12px;
}

.cs-lj-feed-empty {
    text-align: center;
    padding: 36px 20px 48px;
    font-size: 14px;
    line-height: 1.65;
    color: #aaa;
    background: rgba(255, 255, 255, 0.55);
    border-radius: 14px;
    border: 1px dashed rgba(0, 0, 0, 0.06);
}

.cs-lj-feed-card {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 10px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.cs-lj-feed-card-main {
    min-width: 0;
}

.cs-lj-feed-card-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 6px 10px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.cs-lj-feed-card-action {
    margin: 0;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(224, 122, 138, 0.35);
    background: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    line-height: 1.2;
    color: #e55a7a;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.cs-lj-feed-card-action:active {
    opacity: 0.88;
}

.cs-lj-feed-card-action--danger {
    color: #c62828;
    border-color: rgba(198, 40, 40, 0.35);
}

html[data-appearance="dark"] .cs-lj-feed-card-actions {
    border-top-color: rgba(255, 255, 255, 0.08);
}

html[data-appearance="dark"] .cs-lj-feed-card-action {
    background: rgba(60, 60, 64, 0.9);
    color: #ffb3c6;
    border-color: rgba(255, 123, 154, 0.35);
}

html[data-appearance="dark"] .cs-lj-feed-card-action--danger {
    color: #ff8a80;
    border-color: rgba(255, 138, 128, 0.35);
}

.cs-lj-feed-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
}

.cs-lj-feed-card-who {
    font-weight: 700;
    color: #444;
}

.cs-lj-feed-card-time {
    color: #aaa;
    font-size: 12px;
    flex-shrink: 0;
}

.cs-lj-feed-card-body {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.cs-lj-feed-stamp {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #fff5f6;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(224, 122, 138, 0.2);
}

.cs-lj-feed-stamp img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.cs-lj-feed-card-text {
    margin: 0;
    font-size: 15px;
    line-height: 1.55;
    color: #333;
    white-space: pre-wrap;
    word-break: break-word;
    flex: 1;
    min-width: 0;
}

.cs-lj-feed-card-media {
    margin-top: 10px;
}

.cs-lj-feed-card-media-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.cs-lj-feed-card-media-grid.is-count-1 {
    grid-template-columns: minmax(0, 1fr);
    max-width: 236px;
}

.cs-lj-feed-card-media-grid.is-count-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cs-lj-feed-card-media-item {
    border-radius: 12px;
    overflow: hidden;
    background: #f5f7fb;
    aspect-ratio: 1 / 1;
}

.cs-lj-feed-card-media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cs-lj-feed-comments {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(212, 189, 196, 0.45);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cs-lj-feed-comment-row {
    display: flex;
    gap: 6px;
    align-items: flex-start;
    font-size: 13px;
    line-height: 1.5;
}

.cs-lj-feed-comment-author {
    flex-shrink: 0;
    color: #9a6870;
    font-weight: 700;
}

.cs-lj-feed-comment-text {
    color: #5a4a4d;
    white-space: pre-wrap;
    word-break: break-word;
}

.cs-lj-stamp-panel {
    max-width: 340px;
}

.cs-lj-stamp-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    max-height: 52vh;
    overflow-y: auto;
    padding: 2px 0 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.cs-lj-stamp-grid::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.cs-lj-stamp-item {
    border: none;
    border-radius: 12px;
    background: #fafafa;
    padding: 8px 4px 6px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-height: 0;
}

.cs-lj-stamp-item:active {
    background: #f0f0f0;
}

.cs-lj-stamp-item-img {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cs-lj-stamp-item-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cs-lj-stamp-item-label {
    font-size: 11px;
    color: #666;
    text-align: center;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* —— 编辑标题弹层 —— */
.cs-lj-modal {
    position: absolute;
    inset: 0;
    z-index: 50;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    padding: 24px;
    box-sizing: border-box;
}

.cs-lj-modal.is-open {
    display: flex;
}

.cs-lj-modal-panel {
    width: 100%;
    max-width: 320px;
    background: #fff;
    border-radius: 16px;
    padding: 18px 16px 14px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
}

.cs-lj-modal-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
}

.cs-lj-modal-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #e5e5e5;
    font-size: 15px;
    outline: none;
}

.cs-lj-modal-input:focus {
    border-color: #12b7f5;
}

.cs-lj-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
}

.cs-lj-modal-btn {
    padding: 8px 16px;
    border-radius: 10px;
    border: none;
    font-size: 15px;
    cursor: pointer;
}

.cs-lj-modal-btn--ghost {
    background: #f2f2f2;
    color: #666;
}

.cs-lj-modal-btn--primary {
    background: #12b7f5;
    color: #fff;
}

.cs-lj-modal-btn--danger {
    background: #ff5c5c;
    color: #fff;
}

.cs-lj-modal-textarea {
    width: 100%;
    box-sizing: border-box;
    min-height: 120px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #e5e5e5;
    font-size: 15px;
    line-height: 1.45;
    font-family: inherit;
    resize: vertical;
    outline: none;
}

.cs-lj-modal-textarea:focus {
    border-color: #12b7f5;
}

.cs-lj-modal-msg {
    margin: 0 0 4px;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

.cs-lj-post-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
}

.cs-lj-post-menu-btn {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    padding: 11px 14px;
}
