/* ===== Love Space V2 UI ===== */

/* Hero 封面 */
.lovespace-hero {
  position: relative;
  height: 280px;
  overflow: hidden;
  border-radius: 0 0 24px 24px;
}

.lovespace-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lovespace-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(0,0,0,0.15) 0%,
    rgba(0,0,0,0.4) 100%);
}

.lovespace-hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 32px;
  text-align: center;
  color: white;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.lovespace-hero-title {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 32px;
  font-weight: 400;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.lovespace-hero-names {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.5px;
  opacity: 0.95;
}

.lovespace-change-cover {
  position: absolute;
  top: calc(52px + env(safe-area-inset-top));
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s;
}

.lovespace-change-cover:active {
  transform: scale(0.92);
}

/* Feed 区域 */
.lovespace-feed-section {
  padding: 18px 16px 80px;
  background: #FBF9F5;
}

/* 发布入口 composer */
.lovespace-composer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(231,225,215,0.6);
  border-radius: 16px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.lovespace-composer:active {
  transform: scale(0.98);
  background: rgba(255,255,255,0.95);
}

.lovespace-composer-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e8e4dc, #f0ede6);
  flex-shrink: 0;
  overflow: hidden;
}

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

.lovespace-composer-placeholder {
  flex: 1;
  font-size: 14px;
  color: #9a9486;
  font-weight: 400;
}

.lovespace-composer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.lovespace-composer-icon {
  width: 20px;
  height: 20px;
  color: #9a9486;
}

.lovespace-composer-plus {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(196,97,47,0.08);
  color: #A94E22;
  font-size: 18px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Feed 帖子卡片 - 自然流式布局 */
#couplePostsFeed {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.couple-post-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin-bottom: 0;
  animation: none;
  border-bottom: 1px solid rgba(231,225,215,0.5);
  padding-bottom: 18px;
}

.couple-post-card:last-child {
  border-bottom: none;
}

.couple-post-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.couple-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1.5px solid rgba(231,225,215,0.6);
  background: #f8f6f2;
  overflow: hidden;
}

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

.couple-avatar-sm {
  width: 32px;
  height: 32px;
  border-width: 1px;
}

.couple-post-meta {
  flex: 1;
  min-width: 0;
}

.couple-post-name {
  font-size: 14px;
  font-weight: 600;
  color: #1F2421;
  margin-bottom: 2px;
}

.couple-post-time {
  font-size: 12px;
  color: #9a9486;
  font-weight: 400;
}

.couple-post-en {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.6;
  color: #1F2421;
  margin-bottom: 0;
}

.couple-post-zh {
  display: none;
}

/* 图片 - 放在正文下方 */
.couple-post-photo {
  margin: 12px 0 0;
}

.couple-post-photo img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  background: rgba(0,0,0,0.02);
}

/* 点赞/评论行 */
.couple-post-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
}

.couple-like-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: #9a9486;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 400;
  transition: all 0.2s;
}

.couple-like-btn:hover {
  color: #C4612F;
}

.couple-like-btn.couple-liked {
  color: #C4612F;
}

.couple-like-btn .like-num {
  font-weight: 500;
}

/* 评论区 */
.couple-divider {
  height: 1px;
  background: rgba(231,225,215,0.4);
  margin: 14px 0 12px;
}

.couple-comments {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.couple-comment {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.couple-comment-body {
  flex: 1;
  min-width: 0;
}

.couple-comment-name {
  font-size: 13px;
  font-weight: 600;
  color: #1F2421;
  margin-bottom: 3px;
}

.couple-comment-en {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.5;
  color: #5C635D;
}

.couple-comment-zh {
  display: none;
}

.couple-reply-to {
  font-size: 12px;
  color: #9a9486;
  margin-bottom: 3px;
}

/* 翻译按钮 */
.couple-translate-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  color: #9a9486;
  padding: 0;
  font-weight: 400;
  margin-left: auto;
  transition: color 0.2s;
}

.couple-translate-btn:hover {
  color: #C4612F;
}

/* 翻译展开状态 */
.couple-post-zh.show,
.couple-comment-zh.show {
  display: block;
  font-size: 13px;
  color: #7a7a6f;
  font-weight: 300;
  line-height: 1.5;
  margin-top: 4px;
}

/* 空状态 */
.couple-empty {
  text-align: center;
  padding: 60px 20px;
  color: #9a9486;
  font-size: 14px;
  font-weight: 300;
}

/* 删除按钮 */
.couple-delete-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  color: #9a9486;
  padding: 0;
  margin-left: auto;
  transition: color 0.2s;
}

.couple-delete-btn:hover {
  color: #C4612F;
}

/* 角色名字颜色 */
.couple-ghost-name { color: #2d5a30; }
.couple-soap-name  { color: #2d6a8a; }
.couple-gaz-name   { color: #2d7a4a; }
.couple-price-name { color: #4a7a2a; }

/* 婚帖保护（个人页置顶用） */
.couple-wedding {
  background: rgba(242,227,214,0.35);
  border: 1px solid rgba(196,97,47,0.2);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 18px;
}

.couple-pinned-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(196,97,47,0.1);
  color: #A94E22;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  margin-bottom: 10px;
}

.couple-double-avatar {
  position: relative;
  width: 48px;
  height: 40px;
  flex-shrink: 0;
}

.couple-av1,
.couple-av2 {
  position: absolute;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  border: 2px solid #FBF9F5;
  overflow: hidden;
}

.couple-av1 {
  left: 0;
  top: 0;
  z-index: 2;
  background: #3a3a4a;
}

.couple-av2 {
  right: 0;
  bottom: 0;
  z-index: 1;
  background: #5a9a50;
}

.couple-av1 img,
.couple-av2 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* ===== Love Space V3 / desktop scrapbook ===== */
#coupleScreen, #charFeedScreen { background:#f8f2eb; }
#coupleScreen .couple-page-header, #charFeedScreen .couple-page-header { background:#f8f0e7; border-bottom:1px solid #e7d8ca; }
#coupleScreen .couple-page-title, #charFeedScreen .couple-page-title { color:#604537; font-family:Georgia,'Times New Roman',serif; }
.lovespace-hero { height:196px; border-radius:0 0 16px 16px; isolation:isolate; background:#bd9372; }
.lovespace-desk { position:absolute;inset:0; background-image:url('../images/love-space-desk-bg.png');background-position:center 50%;background-size:cover; }
.lovespace-hero::after { content:'';position:absolute;inset:0;background:linear-gradient(90deg,rgba(60,34,20,.06),transparent 65%);pointer-events:none;z-index:0; }
.lovespace-polaroid { position:absolute;z-index:2;left:24%;top:12px;width:132px;height:164px;box-sizing:border-box;padding:8px 8px 0;background:#fffaf2;box-shadow:0 5px 16px rgba(62,35,20,.3);transform:rotate(-6deg); }
.lovespace-polaroid-photo { width:100%;height:122px;overflow:hidden;background:#e6d6c8; }
.lovespace-hero-img {display:block;width:100%;height:100%;object-fit:cover;}
.lovespace-polaroid-caption {font-family:Georgia,'Times New Roman',serif;font-size:10px;line-height:30px;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#745446;}
.lovespace-hero-stamp {position:absolute;z-index:2;right:13px;bottom:11px;font-family:Georgia,serif;font-size:9px;letter-spacing:1.6px;color:#fff8eb;text-shadow:0 1px 5px #65422f;}
.lovespace-hero-overlay,.lovespace-hero-content {display:none;}
.lovespace-change-cover {top:auto;right:auto;left:calc(24% + 103px);bottom:37px;width:30px;height:30px;background:rgba(106,69,52,.82);border:1px solid rgba(255,255,255,.8);box-shadow:0 2px 8px rgba(40,20,10,.25);}
.lovespace-feed-section {background:#f8f2eb;padding:14px 13px 80px;}
.lovespace-composer {background:#fffcf8;border-color:#e8d8c8;box-shadow:0 2px 10px rgba(102,67,48,.04);}
#couplePostsFeed {gap:12px;}
#couplePostsFeed .couple-post-card,#charFeedScreen .couple-post-card {background:#fffcf8;border:1px solid #ecded2;border-radius:15px;padding:15px;margin:0;box-shadow:0 3px 14px rgba(103,71,53,.05);}
#couplePostsFeed .couple-post-name,#charFeedScreen .couple-post-name {color:#674738;}
#couplePostsFeed .couple-post-en,#charFeedScreen .couple-post-en {color:#513d33;}
#couplePostsFeed .couple-post-time,#charFeedScreen .couple-post-time {color:#a48a7b;}
#couplePostsFeed .couple-post-photo img,#charFeedScreen .couple-post-photo img {border-radius:9px;}
#couplePostsFeed .couple-like-btn.couple-liked,#charFeedScreen .couple-like-btn.couple-liked {color:#bc7966;}
#charFeedScreen {background:#f8f2eb;overflow-y:auto;}
#charFeedScreen .charfeed-cover {position:relative;box-sizing:border-box;min-height:194px;display:flex;flex-direction:row;align-items:center;gap:17px;padding:15px 18px 18px;background:radial-gradient(ellipse at 80% 15%,#f6e3d1,#ead6c4 75%,#e2c8b3);border-bottom:1px solid #dcc2ae;overflow:hidden;}
#charFeedScreen .charfeed-cover::before {content:'';position:absolute;right:-15px;top:-30px;width:110px;height:140px;border:1px solid rgba(156,106,75,.17);transform:rotate(18deg);pointer-events:none;}
#charFeedScreen .charfeed-photo-frame {position:relative;z-index:1;flex:0 0 126px;width:126px;height:163px;box-sizing:border-box;padding:8px;background:#fffbf4;box-shadow:0 5px 14px rgba(92,59,39,.21);transform:rotate(-6deg);}
#charFeedScreen .charfeed-photo-frame::before {content:'';position:absolute;left:34px;top:-12px;width:62px;height:22px;background:rgba(209,166,121,.55);transform:rotate(7deg);z-index:3;}
#charFeedScreen .charfeed-avatar {width:110px;height:120px;border:0;border-radius:0;background:#e5d2c3;box-shadow:none;overflow:hidden;font-size:44px;}
#charFeedScreen .charfeed-avatar img {width:100%;height:100%;border-radius:0;object-fit:cover;}
#charFeedScreen .charfeed-photo-caption {display:block;font:italic 10px Georgia,serif;text-align:center;line-height:26px;color:#8b6e5b;}
#charFeedScreen .charfeed-info {position:relative;z-index:1;min-width:0;flex:1;color:#604639;}
#charFeedScreen .charfeed-eyebrow {font:9px Georgia,serif;letter-spacing:1.3px;color:#a7816e;}
#charFeedScreen .charfeed-name {font:600 21px Georgia,'Times New Roman',serif;color:#5d4033;margin:9px 0 8px;overflow-wrap:anywhere;}
#charFeedScreen .charfeed-quote {font:italic 12px/1.55 Georgia,serif;color:#826354;}
#charFeedScreen .charfeed-sub {font-size:11px;color:#a27f6e;margin-top:14px;padding-top:9px;border-top:1px solid rgba(144,99,73,.2);}
#charFeedScreen .charfeed-section-heading {display:flex;justify-content:space-between;align-items:center;padding:17px 16px 8px;color:#674b3c;font-size:14px;font-weight:600;}
#charFeedScreen .charfeed-section-heading small {font:9px Georgia,serif;letter-spacing:1px;color:#a78a79;}
#charFeedScreen .charfeed-list {padding:5px 13px 80px;display:flex;flex-direction:column;gap:12px;}
#charFeedScreen .couple-wedding {background:#fff7f1;border-color:#e5c4b4;}
#charFeedScreen .couple-pinned-tag {background:#f5e5dd;color:#ad7264;}
#charFeedScreen .couple-empty {color:#9d8375;}
@media (max-width:360px) {
 .lovespace-hero {height:185px;}
 .lovespace-polaroid {left:22%;width:121px;height:152px;}
 .lovespace-polaroid-photo {height:111px;}
 .lovespace-change-cover {left:calc(22% + 94px);bottom:36px;}
 #charFeedScreen .charfeed-cover {gap:12px;padding-left:14px;padding-right:12px;}
 #charFeedScreen .charfeed-photo-frame {flex-basis:114px;width:114px;height:152px;}
 #charFeedScreen .charfeed-avatar {width:98px;height:109px;}
 #charFeedScreen .charfeed-name {font-size:19px;}
}

/* V3.1: compact back-only navigation and unclipped photo */
#coupleScreen .couple-page-header.lovespace-minimal-header {
  height:48px !important;min-height:48px !important;padding:0 12px !important;
  display:flex;align-items:center;justify-content:flex-start;position:relative;
  background:#f8f2eb;border-bottom:0;box-sizing:border-box;
}
#coupleScreen .lovespace-minimal-header .couple-back-btn {position:relative;top:auto;left:auto;margin:0;}
#coupleScreen .lovespace-hero {height:196px !important;min-height:196px !important;flex-shrink:0;overflow:hidden;}
#coupleScreen .lovespace-desk {background-image:url('../images/love-space-desk-bg.png');background-size:cover;background-position:center center;}
#coupleScreen .lovespace-polaroid {top:14px;height:158px;padding-bottom:9px;}
#coupleScreen .lovespace-polaroid-photo {height:100%;}
#coupleScreen .lovespace-change-cover {bottom:30px;}
@media(max-width:360px){#coupleScreen .lovespace-hero{height:185px !important;min-height:185px !important;}#coupleScreen .lovespace-polaroid{height:148px;}#coupleScreen .lovespace-change-cover{bottom:27px;}}

/* V3.3 — wider, calmer hero polaroid; cover upload interface unchanged */
#coupleScreen .lovespace-hero {
  height:214px !important;
  min-height:214px !important;
}
#coupleScreen .lovespace-polaroid {
  left:32%;
  top:13px;
  width:168px;
  height:187px;
  padding:9px 9px 11px;
  transform:rotate(-3deg);
  transform-origin:center center;
}
#coupleScreen .lovespace-polaroid-photo {height:100%;}
#coupleScreen .lovespace-change-cover {
  left:calc(32% + 128px);
  right:auto;
  top:auto;
  bottom:28px;
  width:32px;
  height:32px;
}
@media (max-width:360px) {
  #coupleScreen .lovespace-hero {height:203px !important;min-height:203px !important;}
  #coupleScreen .lovespace-polaroid {left:29%;top:12px;width:155px;height:177px;}
  #coupleScreen .lovespace-change-cover {left:calc(29% + 116px);bottom:25px;}
}
