/* ===== 喃言 · 全局样式 ===== */
/* 设计令牌 */
:root {
  --fog: #9B8EC4;
  --fog-light: #C9BFDF;
  --fog-soft: #ECE7F3;
  --fog-dark: #6B5B8A;
  --bg: #FAF7F5;
  --bg-warm: #F3ECE6;
  --card: #FFFFFF;
  --danger: #D4888E;
  --danger-soft: #F6E0E1;
  --ink: #4A4458;
  --ink-soft: #8B83A0;
  --ink-faint: #B4ADC1;
  --line: #ECE6F0;
  --ok: #8FB9A6;
  --shadow: 0 6px 24px rgba(120, 105, 150, 0.10);
  --shadow-soft: 0 2px 10px rgba(120, 105, 150, 0.06);
  --radius: 16px;
  --radius-sm: 10px;
  --t: 0.25s ease;
  --maxw: 460px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}
/* PC 居中手机宽度容器 */
.app {
  width: 100%;
  max-width: var(--maxw);
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  display: flex;
  flex-direction: column;
}
@media (min-width: 600px) {
  body { align-items: center; padding: 24px 0; background: #EFE9EE; }
  .app {
    min-height: 92vh;
    max-height: 92vh;
    border-radius: 28px;
    box-shadow: 0 20px 60px rgba(80, 65, 110, 0.18);
    overflow: hidden;
  }
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: 15px; color: var(--ink); }
img { display: block; max-width: 100%; }

/* ===== 顶部导航条 ===== */
.topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 18px 12px;
  background: var(--bg);
  position: sticky; top: 0; z-index: 20;
}
.topbar .btn-back {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--card); box-shadow: var(--shadow-soft);
  transition: transform var(--t);
}
.topbar .btn-back:active { transform: scale(0.9); }
.topbar .title { font-size: 17px; font-weight: 600; color: var(--ink); flex: 1; }
.topbar .title-sub { font-size: 12px; color: var(--ink-soft); font-weight: 400; }
.topbar .action { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--card); box-shadow: var(--shadow-soft); }
/* Profile 主页标题：独占一行居中，紫色粗体大字间距 */
.topbar.profile-topbar { justify-content: center; position: relative; padding-top: 18px; }
.topbar.profile-topbar .title {
  flex: 0 0 auto;
  font-size: 24px;
  font-weight: 700;
  color: #9B8EC4;
  letter-spacing: 4px;
  text-align: center;
}
.topbar.profile-topbar .action { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); }

/* ===== 通用布局 ===== */
.page { flex: 1; display: flex; flex-direction: column; padding: 4px 18px 28px; }
.page-scroller { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.section-title { font-size: 15px; color: var(--ink-soft); margin: 18px 12px 10px; letter-spacing: 0.5px; font-weight: 600; }
.spacer { flex: 1; }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: 12px; font-size: 15px; font-weight: 500;
  background: var(--fog); color: #fff; transition: transform var(--t), background var(--t), opacity var(--t);
  width: 100%;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; }
.btn-ghost { background: var(--fog-soft); color: var(--fog-dark); }
.btn-outline { background: transparent; color: var(--fog-dark); border: 1.5px solid var(--fog-light); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 8px 14px; font-size: 13px; width: auto; border-radius: 10px; }
.btn-link { background: none; color: var(--fog-dark); padding: 8px 10px; width: auto; font-size: 14px; }

/* ===== 卡片 ===== */
.card {
  background: var(--card); border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow-soft);
}
.card-tap { cursor: pointer; transition: transform var(--t); }
.card-tap:active { transform: scale(0.985); }

/* ===== 表单 ===== */
.field { margin-bottom: 10px; }
.field label { display: block; font-size: 13px; color: var(--ink-soft); margin-bottom: 4px; padding-left: 2px; }
.input, .textarea, .select {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--card); color: var(--ink);
  transition: border var(--t), box-shadow var(--t); outline: none;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--fog); box-shadow: 0 0 0 3px var(--fog-soft); }
.textarea { resize: none; line-height: 1.6; }
.field-hint { font-size: 12px; color: var(--ink-faint); margin-top: 3px; padding-left: 2px; display: flex; justify-content: space-between; }
.field-err { color: var(--danger); }
.input-count { color: var(--ink-faint); }

/* ===== Toast ===== */
.toast-wrap {
  position: fixed; left: 0; right: 0; bottom: 80px; z-index: 9999;
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
  padding: 0 24px;
}
.toast-wrap > div { max-width: var(--maxw); }
.toast {
  background: rgba(74, 68, 88, 0.94); color: #fff; padding: 10px 18px; border-radius: 20px;
  font-size: 13.5px; box-shadow: 0 6px 20px rgba(0,0,0,0.18);
  animation: toastIn 0.25s ease;
}
.toast.err { background: rgba(193, 84, 90, 0.94); }
.toast.ok { background: rgba(107, 91, 138, 0.94); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ===== 遮罩 / 弹窗 ===== */
.mask {
  position: fixed; inset: 0; z-index: 200; background: rgba(40, 32, 56, 0.42);
  display: flex; align-items: flex-end; justify-content: center; animation: fadeIn var(--t);
}
@media (min-width: 600px) { .mask { align-items: center; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  width: 100%; max-width: var(--maxw); background: var(--bg);
  border-radius: 24px 24px 0 0; padding: 20px 20px 28px; max-height: 86vh; overflow-y: auto;
  animation: sheetUp var(--t);
}
@media (min-width: 600px) { .sheet { border-radius: 24px; } }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.sheet-head h3 { font-size: 17px; font-weight: 600; }
.sheet-close { width: 32px; height: 32px; border-radius: 50%; background: var(--fog-soft); color: var(--ink-soft); display: flex; align-items: center; justify-content: center; transition: background var(--t), color var(--t); }
.sheet-close:hover { background: var(--fog-light); color: var(--fog-dark); }

/* 确认弹窗 */
.confirm-card {
  width: calc(100% - 48px); max-width: 340px; background: var(--card);
  border-radius: 20px; padding: 22px; text-align: center; animation: popIn var(--t);
}
@keyframes popIn { from { transform: scale(0.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.confirm-card .ci-icon { width: 48px; height: 48px; margin: 0 auto 12px; }
.confirm-card h3 { font-size: 17px; margin-bottom: 8px; }
.confirm-card p { font-size: 14px; color: var(--ink-soft); margin-bottom: 18px; line-height: 1.6; }
.confirm-card .row { display: flex; gap: 10px; }
.confirm-card .row .btn { width: 1px; flex: 1; }

/* ===== 头像（7预设图片，含裂图降级） ===== */
.avatar {
  display: inline-block; border-radius: 50%; overflow: hidden; line-height: 0;
  background: var(--fog-soft); position: relative; flex-shrink: 0;
}
.avatar img, .avatar svg { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ===== 空间卡片 ===== */
.space-card {
  display: flex; align-items: center; justify-content: center; gap: 14px; padding: 14px; background: var(--card);
  border-radius: var(--radius); box-shadow: var(--shadow-soft); position: relative;
  transition: transform var(--t); cursor: pointer;
}
.space-card:active { transform: scale(0.985); }
.space-card .avatars { display: flex; flex-shrink: 0; }
.space-card .avatars .avatar { width: 44px; height: 44px; border: 2px solid var(--bg); }
.space-card .avatars .avatar + .avatar { margin-left: -14px; }
.space-card .info { flex: 1; min-width: 0; }
.space-card .info .name { font-size: 15px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.space-card .info .intro { font-size: 12.5px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.badge-dot {
  position: absolute; top: 12px; right: 12px; min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--danger); color: #fff; border-radius: 9px; font-size: 11px; line-height: 18px;
  text-align: center; box-shadow: 0 2px 6px rgba(193,84,90,0.4);
}
.tag { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 8px; background: var(--fog-soft); color: var(--fog-dark); }
.tag-warn { background: var(--danger-soft); color: var(--danger); }

/* ===== 标签栏 (space tabs) ===== */
.tabs {
  display: flex; gap: 4px; padding: 0 18px; background: var(--bg);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 15;
}
.tab {
  flex: 1; padding: 12px 4px; font-size: 13.5px; color: var(--ink-soft); text-align: center;
  position: relative; transition: color var(--t);
}
.tab.active { color: var(--fog-dark); font-weight: 600; }
.tab.active::after {
  content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 22px; height: 3px; border-radius: 2px; background: var(--fog);
}
.tab .tab-dot { position: absolute; top: 8px; left: 50%; margin-left: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); }

/* 喃呱新消息通知条 */
.nangua-notice {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  z-index: 9999; display: flex; align-items: center; gap: 10px;
  background: #fff; border-radius: 14px; padding: 10px 16px 10px 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12); cursor: pointer;
  animation: noticeSlideDown 0.3s ease; max-width: calc(100% - 24px);
}
@keyframes noticeSlideDown {
  from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.nangua-notice .notice-avatar { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.nangua-notice .notice-avatar img { width: 100%; height: 100%; object-fit: cover; }
.nangua-notice .notice-text { font-size: 13.5px; color: var(--ink); flex: 1; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nangua-notice .notice-text b { color: var(--fog-dark); }
.nangua-notice .notice-close { color: var(--ink-soft); font-size: 18px; padding: 0 4px; cursor: pointer; flex-shrink: 0; }

/* ===== 底部固定输入栏 ===== */
.bottom-bar {
  position: sticky; bottom: 0; left: 0; right: 0; background: var(--bg);
  padding: 10px 18px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: flex-end;
}
.bottom-bar .input { border-radius: 22px; }
.bottom-bar .send-btn {
  width: 40px; height: 40px; border-radius: 50%; background: var(--fog); color: #fff;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: transform var(--t);
}
.bottom-bar .send-btn:active { transform: scale(0.9); }
.bottom-bar .send-btn:disabled { background: var(--ink-faint); }

/* ===== 泡泡卡片 ===== */
.bubble {
  background: var(--card); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow-soft);
  margin-bottom: 12px; position: relative; transition: transform var(--t);
}
.bubble.mine { border-left: 3px solid #C9B8E8; }
.bubble .b-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.bubble .b-head .avatar { width: 32px; height: 32px; }
.bubble .b-head .meta { flex: 1; min-width: 0; }
.bubble .b-head .meta .who { font-size: 13px; font-weight: 600; color: var(--ink); }
.bubble .b-head .meta .when { font-size: 11.5px; color: var(--ink-faint); }
.bubble .b-head .emo { width: 30px; height: 30px; }
.bubble .b-text { font-size: 14.5px; line-height: 1.6; color: var(--ink); white-space: pre-wrap; word-break: break-word; }
.bubble .b-img { margin-top: 10px; border-radius: 10px; overflow: hidden; background: var(--fog-soft); height: 0; padding-bottom: 56%; position: relative; }
.bubble .b-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bubble .b-foot { display: flex; justify-content: flex-end; gap: 6px; margin-top: 10px; }
.bubble .private-flag { position: absolute; top: 14px; right: 14px; display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--ink-faint); }

/* 留言条 */
.msg { display: flex; gap: 10px; margin-bottom: 14px; }
.msg .avatar { width: 36px; height: 36px; flex-shrink: 0; }
.msg .m-body { flex: 1; min-width: 0; }
.msg .m-body .m-meta { font-size: 12px; color: var(--ink-soft); margin-bottom: 3px; display: flex; gap: 8px; align-items: center; }
.msg .m-body .m-meta .who { color: var(--fog-dark); font-weight: 600; }
.msg .bubble-bg { background: var(--fog-soft); padding: 10px 14px; border-radius: 4px 14px 14px 14px; display: inline-block; }
.msg .bubble-bg .t { font-size: 14px; line-height: 1.55; color: var(--ink); white-space: pre-wrap; word-break: break-word; }
.msg .m-del { font-size: 11px; color: var(--ink-faint); margin-left: 8px; }
.msg.mine { flex-direction: row-reverse; }
.msg.mine .m-body { text-align: right; }
.msg.mine .bubble-bg { background: var(--fog); color: #fff; border-radius: 14px 4px 14px 14px; }
.msg.mine .bubble-bg .t { color: #fff; }

/* 密语输入区（上下结构） */
.bottom-bar.msg-mode { flex-direction: column; align-items: stretch; gap: 10px; }
.bottom-bar .msg-textarea {
  width: 100%; min-height: 80px; max-height: 140px; resize: none;
  border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.5;
  box-sizing: border-box; font-family: inherit;
}
.bottom-bar .msg-send-row { display: flex; justify-content: flex-end; }
.bottom-bar .msg-send-btn { padding: 8px 24px; font-size: 14px; }

/* ===== 阅后即焚：🔥开关 + 粉色主题 ===== */
.bottom-bar .msg-input-row { display: flex; gap: 8px; align-items: flex-end; width: 100%; }
.bottom-bar .msg-input-row .msg-textarea { flex: 1; }
.burn-toggle {
  width: 36px; height: 36px; flex: 0 0 36px;
  border-radius: 50%; background: var(--card);
  border: 1.5px solid var(--line); color: var(--ink-faint);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--t); padding: 0;
}
.burn-toggle svg { display: block; }
.burn-toggle.active {
  background: #FFE4EC; border-color: #F8BBD0; color: #E91E63;
  box-shadow: 0 0 12px rgba(233, 30, 99, 0.35);
}
.burn-toggle:active { transform: scale(0.92); }

/* 输入框燃色（开启状态） */
.bottom-bar .msg-textarea.burn-mode {
  border: 1.5px solid #F8BBD0; background: #FFF5F8;
  caret-color: #E91E63;
}
.bottom-bar .msg-textarea.burn-mode::placeholder { color: #F48FB1; }

/* 阅后即焚图片上传预览 */
.burn-img-area { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.burn-add-img {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 12px; border-radius: 8px; background: #FFF5F8;
  border: 1px solid #F8BBD0; color: #E91E63; font-size: 13px;
  cursor: pointer; transition: all var(--t); align-self: flex-start;
}
.burn-add-img:active { transform: scale(0.96); }
.burn-add-img svg { width: 16px; height: 16px; }
.burn-img-preview { position: relative; display: inline-block; align-self: flex-start; }
.burn-img-preview img { max-width: 100px; max-height: 100px; border-radius: 8px; border: 1px solid #F8BBD0; display: block; }
.burn-img-del {
  position: absolute; top: -6px; right: -6px; width: 20px; height: 20px;
  border-radius: 50%; background: #E91E63; color: #fff; border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; cursor: pointer; line-height: 1;
}

/* 阅后即焚消息气泡：只显示🔥图标 */
.msg.burn .bubble-bg.burn-bubble {
  background: #FFE4EC; border: 1px solid #F8BBD0; border-radius: 14px;
  padding: 12px 24px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  cursor: pointer; transition: all var(--t); position: relative;
}
.msg.burn.mine .bubble-bg.burn-bubble { background: linear-gradient(135deg, #FFE4EC, #FFD1DC); }
.msg.burn .burn-big-ico { width: 32px; height: 32px; color: #E91E63; display: flex; align-items: center; justify-content: center; }
.msg.burn .burn-big-ico svg { width: 32px; height: 32px; }
.msg.burn .burn-label { font-size: 11px; color: var(--ink-faint); }

/* 已查看状态（灰色） */
.msg.burn.viewed .bubble-bg.burn-bubble { background: #E0E0E0; border-color: #ccc; cursor: default; }
.msg.burn.viewed .burn-big-ico { color: #999; opacity: 0.5; }
.msg.burn.viewed .burn-label { color: #999; }
.msg.burn.viewed .burn-viewed-text { font-size: 12px; color: #999; }
.msg.burn.viewed { opacity: 1; }

/* 全屏查看弹窗：Instagram 限时动态卡片样式 */
.burn-viewer {
  position: absolute; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.85); display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 24px;
}
.burn-viewer .bv-card {
  width: 100%;
  max-width: 360px;
  background: #FFFFFF;
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 86vh;
}
.burn-viewer .bv-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 14px 14px 10px;
  border-bottom: 1px solid #F0ECE6;
}
.burn-viewer .bv-time {
  grid-column: 1;
  grid-row: 1;
  font-size: 11px;
  color: #B4ADC1;
  text-align: left;
  align-self: center;
}
.burn-viewer .bv-sender {
  grid-column: 2;
  grid-row: 1;
  font-size: 16px;
  font-weight: 700;
  color: #4A4458;
  text-align: center;
  letter-spacing: 0.5px;
}
.burn-viewer .bv-close {
  grid-column: 3;
  grid-row: 1;
  width: 30px; height: 30px;
  margin-left: auto;
  border-radius: 50%;
  background: #F3ECE6;
  color: #8B83A0;
  border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}
.burn-viewer .bv-close:active { background: #EADFD9; }

.burn-viewer .bv-body {
  padding: 16px 16px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  overflow-y: auto;
}
.burn-viewer .bv-img-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
}
.burn-viewer .bv-img {
  max-width: 85%;
  max-height: 55vh;
  border-radius: 12px;
  object-fit: contain;
  display: block;
  background: #FAF7F5;
}
.burn-viewer .bv-img-placeholder {
  width: 85%;
  max-width: 300px;
  height: 160px;
  background: #F0ECE6;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8B83A0;
  font-size: 13px;
}
.burn-viewer .bv-text {
  color: #4A4458;
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
  width: 100%;
  max-height: 4.8em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

/* 聊天气泡 */
.chat-bubble { max-width: 78%; padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; margin-bottom: 4px; }
.chat-bubble.them { background: var(--card); color: var(--ink); border-radius: 4px 16px 16px 16px; box-shadow: var(--shadow-soft); align-self: flex-start; }
.chat-bubble.me { background: var(--fog); color: #fff; border-radius: 16px 4px 16px 16px; align-self: flex-end; }
.chat-time { font-size: 11px; color: var(--ink-faint); margin: 10px 0 6px; text-align: center; }

/* ===== 日历 ===== */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-head .ym { font-size: 16px; font-weight: 600; }
.cal-nav { width: 34px; height: 34px; border-radius: 50%; background: var(--card); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-soft); transition: opacity var(--t); }
.cal-nav.disabled { opacity: 0.3; cursor: not-allowed; pointer-events: none; box-shadow: none; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-grid .dow { text-align: center; font-size: 11px; color: var(--ink-faint); padding: 6px 0; }
.cal-cell { aspect-ratio: 1; border-radius: 10px; background: var(--card); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 12px; color: var(--ink); position: relative; cursor: pointer; transition: transform var(--t); box-shadow: var(--shadow-soft); }
.cal-cell:active { transform: scale(0.94); }
.cal-cell.mute { background: transparent; box-shadow: none; color: var(--ink-faint); }
.cal-cell.today { outline: 2px solid var(--fog-light); }
.cal-cell .emo { width: 18px; height: 18px; }
.cal-cell .d { font-size: 10px; color: var(--ink-soft); }
.cal-cell .duo { position: absolute; bottom: 3px; display: flex; gap: 1px; }
.cal-cell .duo .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--fog-light); }
.cal-cell.sel { background: var(--fog); color: #fff; }
.cal-cell.sel .d { color: rgba(255,255,255,0.85); }

/* 情绪选择条（统一：发泡泡弹窗 + 日历当日详情） */
.emo-picker, .day-emo-row { display: flex; gap: 6px; justify-content: space-between; padding: 4px 0; }
.emo-opt {
  width: 52px; height: 64px; border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: transparent; border: 2px solid transparent;
  transition: all var(--t); cursor: pointer; flex-shrink: 0;
}
.emo-opt .emo { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; margin-bottom: 4px; }
.emo-opt .emo svg { width: 32px; height: 32px; display: block; }
.emo-opt .ename { font-size: 11px; color: var(--ink); text-align: center; line-height: 1.2; }
.emo-opt.sel { background: var(--fog-soft); border-color: var(--fog); }
.emo-opt:active { transform: scale(0.94); }

/* 颜色选择 */
.color-pick { display: flex; gap: 10px; align-items: center; }
.color-pick input[type=color] { width: 38px; height: 38px; border: none; border-radius: 10px; background: none; padding: 0; }
.color-pick input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.color-pick input[type=color]::-webkit-color-swatch { border: 2px solid var(--card); border-radius: 10px; }

/* ===== 周报海报 ===== */
.poster {
  background: #ECE7F3;
  border-radius: 20px; padding: 22px 20px; color: var(--ink); position: relative; overflow: hidden;
}
.poster .p-brand { font-size: 13px; color: var(--fog-dark); letter-spacing: 2px; }
.poster .p-title { font-size: 20px; font-weight: 700; margin: 6px 0 2px; }
.poster .p-range { font-size: 12px; color: var(--ink-soft); margin-bottom: 16px; }
.poster .p-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.poster .p-stat { background: rgba(255,255,255,0.7); border-radius: 12px; padding: 12px; }
.poster .p-stat .n { font-size: 22px; font-weight: 700; color: var(--fog-dark); }
.poster .p-stat .l { font-size: 11px; color: var(--ink-soft); }
.poster .p-emos { display: flex; gap: 6px; margin-bottom: 14px; }
.poster .p-emos .pe { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.poster .p-emos .pe .emo { width: 26px; height: 26px; }
.poster .p-emos .pe .c { font-size: 11px; color: var(--ink-soft); }
.poster .p-quote { background: rgba(255,255,255,0.6); border-radius: 12px; padding: 12px; font-size: 13px; line-height: 1.6; color: var(--ink); }
.poster .p-avatars { position: absolute; right: 18px; top: 18px; display: flex; }
.poster .p-avatars .avatar { width: 28px; height: 28px; border: 2px solid #FAF7F5; }
.poster .p-avatars .avatar + .avatar { margin-left: -10px; }
.poster .p-foot { margin-top: 14px; font-size: 10px; color: var(--ink-faint); text-align: right; }

/* ===== 空状态 ===== */
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 50px 20px; text-align: center; }
.empty .emo { width: 72px; height: 72px; margin-bottom: 16px; opacity: 0.9; }
.empty .t { font-size: 14.5px; color: var(--ink-soft); }
.empty .sub { font-size: 12.5px; color: var(--ink-faint); margin-top: 6px; }

/* ===== 落地页 ===== */
.brand-page { display: flex; flex-direction: column; min-height: 100vh; padding: 0 22px; }
.brand-hero { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 32px 0 16px; }
/* 顶部标题：紫色粗体 24px，居中，位于 logo 上方 */
.brand-hero .brand-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--fog-dark);
  letter-spacing: 6px;
  margin-bottom: 18px;
  text-align: center;
}
.brand-hero .logo-emo {
  width: 110px;
  height: 110px;
  margin-bottom: 18px;
  animation: float 4s ease-in-out infinite;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-hero .logo-emo img#logoImg {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(107,91,138,0.2);
  display: block;
}
.brand-hero .logo-emo img#logoImg:not([src]),
.brand-hero .logo-emo img#logoImg[src=""] { display: none; }
.brand-hero .logo-emo img#logoImg.broken { display: none; }
.brand-hero .logo-emo #logoFallback {
  display: none;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: linear-gradient(135deg, #D8D0E0, #E8DCEA);
  box-shadow: 0 8px 24px rgba(107,91,138,0.15);
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.brand-hero h1 { font-size: 30px; font-weight: 700; color: var(--fog-dark); letter-spacing: 4px; }
.brand-hero .slogan { font-size: 14px; color: var(--ink-soft); margin-top: 10px; letter-spacing: 2px; }
.brand-hero .desc { font-size: 14px; color: var(--ink-soft); margin-top: 20px; line-height: 1.8; max-width: 320px; }

/* tab分段切换 (登录/注册) */
.seg { display: flex; background: var(--fog-soft); border-radius: 12px; padding: 4px; margin-bottom: 20px; }
.seg .seg-item { flex: 1; text-align: center; padding: 9px; font-size: 14px; color: var(--ink-soft); border-radius: 9px; transition: all var(--t); }
.seg .seg-item.active { background: #fff; color: var(--fog-dark); font-weight: 600; box-shadow: var(--shadow-soft); }

/* 个人主页头部 */
.profile-head { text-align: center; padding: 22px 0 16px; }
.profile-head .avatar { width: 78px; height: 78px; margin: 0 auto 12px; }
.profile-head .nick { font-size: 19px; font-weight: 600; }
.profile-head .uname { font-size: 12px; color: var(--ink-faint); margin-top: 2px; }

/* 功能宫格 */
.grid-fns { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 0 16px; }
.fn-item { background: var(--card); border-radius: var(--radius); padding: 12px 10px; text-align: center; box-shadow: var(--shadow-soft); transition: transform var(--t); position: relative; }
.fn-item:active { transform: scale(0.96); }
.fn-item .ico { width: 26px; height: 26px; margin: 0 auto 6px; color: var(--fog-dark); display: flex; align-items: center; justify-content: center; }
.fn-item .l { font-size: 12.5px; color: var(--ink); text-align: center; }
.fn-item .pill { position: absolute; top: 8px; right: 8px; min-width: 16px; height: 16px; padding: 0 4px; background: var(--danger); color: #fff; border-radius: 8px; font-size: 10px; line-height: 16px; text-align: center; }

/* 空间头部 */
.space-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: var(--bg); }
.space-head .avatars { display: flex; }
.space-head .avatars .avatar { width: 42px; height: 42px; border: 2px solid var(--bg); }
.space-head .avatars .avatar + .avatar { margin-left: -14px; }
.space-head .s-info { flex: 1; min-width: 0; text-align: center; }
.space-head .s-info .s-name { font-size: 16px; font-weight: 600; text-align: center; }
.space-head .s-info .s-intro { font-size: 12px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.space-head .s-act { width: 34px; height: 34px; border-radius: 50%; background: var(--card); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-soft); }

/* 周报历史卡片 */
.report-card { background: var(--card); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-soft); margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; transition: transform var(--t); }
.report-card:active { transform: scale(0.985); }
.report-card .r-range { font-size: 14px; font-weight: 600; }
.report-card .r-sub { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }

/* 时间线：我们的记录 */
.timeline { position: relative; padding: 4px 0 20px 20px; }
.timeline::before { content:''; position:absolute; left:6px; top:2px; bottom:2px; width:2px; background: var(--fog-soft); }
.tl-item { position: relative; padding: 4px 0 18px 12px; }
.tl-item.last { padding-bottom: 4px; }
.tl-dot { position:absolute; left:-13px; top:8px; width:12px; height:12px; border-radius: 50%; background: var(--fog); box-shadow: 0 0 0 3px var(--bg-warm); }
.tl-date { font-size: 15px; font-weight: 700; color: var(--fog-dark); margin-bottom: 4px; }
.tl-stat { font-size: 13px; color: var(--ink); line-height: 1.5; }
.tl-event { margin-top: 6px; font-size: 12px; color: var(--fog); background: var(--fog-soft); padding: 6px 10px; border-radius: 8px; display: inline-block; }

/* 和解邀请卡片 */
.recon-card { background: linear-gradient(135deg, #ECE7F3, #F6EEF2); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow-soft); }
.recon-card .rc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.recon-card .rc-head .avatar { width: 32px; height: 32px; }
.recon-card .rc-from { font-size: 13px; }
.recon-card .rc-from b { color: var(--fog-dark); }
.recon-card .rc-msg { font-size: 14px; line-height: 1.6; color: var(--ink); background: rgba(255,255,255,0.7); border-radius: 10px; padding: 10px 12px; }
.recon-card .rc-time { font-size: 11px; color: var(--ink-faint); margin-top: 8px; }
.recon-card .rc-actions { display: flex; gap: 8px; margin-top: 12px; }
.recon-card .rc-actions .btn { flex: 1; padding: 9px 10px; font-size: 13px; }
.recon-card .rc-status { font-size: 13px; color: var(--ink-soft); margin-top: 10px; text-align: center; }

/* 聊天面板 */
.chat-panel { position: fixed; inset: 0; z-index: 300; background: var(--bg); display: flex; flex-direction: column; max-width: var(--maxw); margin: 0 auto; }
@media (min-width: 600px) { .chat-panel { border-radius: 0; height: 92vh; top: 4vh; } }
.chat-panel .cp-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); background: var(--bg); }
.chat-panel .cp-body { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; }
.chat-panel .cp-foot { padding: 10px 18px; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: flex-end; background: var(--bg); }
.chat-system { text-align: center; font-size: 11px; color: var(--ink-faint); margin: 8px 0; line-height: 1.5; }

/* 通用工具类 */
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
/* 私密泡泡行：锁图标 / 文字 / 复选框 同一行垂直居中，整行点击可切换 */
.private-row {
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 10px 12px;
  margin: 0;
  border-radius: 12px;
  background: var(--card);
  cursor: pointer;
  user-select: none;
  font-size: 14px;
  color: var(--ink);
}
.private-row > .ico { flex: 0 0 auto; display: inline-flex; align-items: center; }
.private-row > .ptxt { flex: 0 1 auto; display: inline-flex; align-items: center; }
.private-row > input[type="checkbox"] {
  margin-left: auto !important;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  accent-color: var(--primary);
}
.muted { color: var(--ink-soft); }
.faint { color: var(--ink-faint); }
.small { font-size: 12px; }
.center { text-align: center; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.mb8 { margin-bottom: 8px; } .mb16 { margin-bottom: 16px; }
.hidden { display: none !important; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.text-danger { color: var(--danger); }
.nowrap { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ====================== 漂浮泡泡池 ====================== */
.bubble-pool {
  position: relative;
  width: 100%;
  height: calc(100vh - 340px);
  min-height: 420px;
  background: radial-gradient(ellipse at 30% 20%, #F3EBF6 0%, transparent 60%),
              radial-gradient(ellipse at 70% 80%, #F0E4F1 0%, transparent 55%),
              linear-gradient(180deg, #FAF7F5 0%, #F6F1F5 100%);
  border-radius: 16px;
  overflow: hidden;
}
@media (max-height: 720px) {
  .bubble-pool { height: 380px; min-height: 380px; }
}
.pool-bubble {
  position: absolute;
  border-radius: 50%;
  box-shadow: 0 10px 28px rgba(107,91,138,0.15), inset 0 -6px 14px rgba(255,255,255,0.55), inset 0 4px 8px rgba(255,255,255,0.6);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  animation: floatBubble 3s ease-in-out infinite;
  will-change: transform;
  transition: transform 0.25s ease;
}
.pool-bubble:active { transform: scale(0.92) !important; }
.pool-bubble.has-new::after {
  content: '';
  position: absolute;
  top: -2px; right: -2px;
  width: 10px; height: 10px; border-radius: 50%;
  background: #E0585F;
  box-shadow: 0 0 0 2px #fff;
}
.pool-bubble .pb-emo {
  width: 46%; height: 46%;
  display: flex; align-items: center; justify-content: center;
}
.pool-bubble .pb-emo svg, .emo svg {
  width: 100%; height: 100%; display: block;
}
.pool-bubble .pb-avatar {
  position: absolute;
  right: -6px; top: -6px;
  width: 34px; height: 34px;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
@keyframes floatBubble {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-8px); }
  100% { transform: translateY(0); }
}

/* 戳开泡泡弹窗内容 */
.pop-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.pop-head .avatar { width: 36px; height: 36px; }
.pop-head .who { font-weight: 600; font-size: 14px; color: var(--ink); flex: 1; }
.pop-head .when { font-size: 11.5px; color: var(--ink-faint); }
.pop-emotion {
  display: flex; align-items: center; gap: 8px;
  background: var(--fog-soft); border-radius: 10px; padding: 8px 12px; margin-bottom: 12px;
}
.pop-emotion .emo { width: 28px; height: 28px; }
.pop-emotion .ename { font-size: 13px; color: var(--fog-dark); font-weight: 600; }
.pop-text {
  background: #fff; border-radius: 12px; padding: 14px; font-size: 14px;
  line-height: 1.7; color: var(--ink); box-shadow: var(--shadow-soft); margin-bottom: 14px;
  white-space: pre-wrap; word-break: break-word;
}
.pop-text img { max-width: 100%; border-radius: 8px; margin-top: 10px; }
.comments-list { max-height: 200px; overflow-y: auto; margin-bottom: 12px; }
.comment-item {
  display: flex; gap: 10px; padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}
.comment-item:last-child { border-bottom: none; }
.comment-item .avatar { width: 28px; height: 28px; flex-shrink: 0; }
.comment-item .c-body { flex: 1; min-width: 0; }
.comment-item .c-meta { font-size: 11px; color: var(--ink-faint); margin-bottom: 3px; display: flex; justify-content: space-between; }
.comment-item .c-meta .who { font-weight: 600; color: var(--fog-dark); }
.comment-item .c-text { font-size: 13px; color: var(--ink); line-height: 1.55; word-break: break-word; }
/* 留言输入行：输入框 flex:1 + 按钮 64px，二者严格等高 44px 同一水平基线 */
.cmt-input-row { display: flex; align-items: center; gap: 8px; }
.cmt-input-row .input {
  flex: 1 1 auto;
  box-sizing: border-box;
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  line-height: 20px;
  padding: 0 14px;
  border-radius: 12px;
  margin: 0;
  overflow: hidden;
}
.cmt-input-row .btn {
  box-sizing: border-box;
  width: 64px;
  flex: 0 0 64px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  margin: 0;
  font-size: 14px;
  border-radius: 12px;
}
.cmt-empty { text-align: center; font-size: 12px; color: var(--ink-faint); padding: 14px 0; }
.private-entry {
  display: block; width: 100%;
  margin-top: 12px; padding: 12px;
  background: var(--card); border-radius: 12px;
  text-align: center; color: var(--fog-dark); font-size: 13px;
  box-shadow: var(--shadow-soft); cursor: pointer;
}

/* 7个头像预设选择器 */
.avatar-pick {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px;
  margin: 8px 0 16px;
}
.avatar-pick .av-opt {
  width: 100%; aspect-ratio: 1 / 1; border-radius: 50%;
  overflow: hidden; position: relative; cursor: pointer;
  border: 3px solid transparent; transition: all 0.2s;
  box-shadow: var(--shadow-soft);
}
.avatar-pick .av-opt img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-pick .av-opt.sel { border-color: var(--fog); transform: scale(1.05); }

/* 日历格子里的情绪小图标 */
.cal-cell {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding: 6px 2px; height: 58px; position: relative; cursor: pointer;
  border-radius: 10px; transition: background 0.2s;
}
.cal-cell:hover { background: rgba(155,142,196,0.08); }
.cal-cell .d { font-size: 12px; color: var(--ink); line-height: 1; margin-top: 2px; }
.cal-cell.mute .d { color: var(--ink-faint); }
.cal-cell.today { background: rgba(155,142,196,0.12); }
.cal-cell.today .d { color: var(--fog-dark); font-weight: 700; }
.cal-cell.sel { background: var(--fog); color: #fff; }
.cal-cell.sel .d { color: #fff; }
.cal-emos {
  display: flex; gap: 2px; align-items: center; justify-content: center;
  margin-top: 4px;
}
.cal-emos .emo { width: 18px; height: 18px; }
.duo { margin-top: 2px; }

/* 详情弹窗中喃呱情绪图标旁的小标识 */
.nangua-tag {
  position: absolute; right: -6px; bottom: -4px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--fog); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
  border: 1.5px solid var(--card);
}

/* 当日详情里的横排情绪选择（沿用统一 .emo-opt 样式） */
.day-emo-row { padding: 8px 0 12px; }

/* ===== 心情日记 ===== */
.diary-section { margin-top: 4px; }
.diary-toggle-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
  font-size: 12px; color: var(--ink-soft);
}
.diary-switch {
  position: relative; width: 44px; height: 24px; border-radius: 12px;
  background: #E0DAE8; cursor: pointer; transition: background var(--t); flex-shrink: 0;
}
.diary-switch.on { background: var(--fog); }
.diary-switch .knob {
  position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  transition: transform var(--t);
}
.diary-switch.on .knob { transform: translateX(20px); }
.diary-toggle-label { font-weight: 500; }
.diary-textarea {
  width: 100%; min-height: 70px; resize: vertical;
  border: 1.5px solid var(--line); border-radius: 10px;
  padding: 10px 12px; font-size: 14px; line-height: 1.5;
  color: var(--ink); background: var(--card);
  transition: border-color var(--t);
}
.diary-textarea:focus { outline: none; border-color: var(--fog-light); }
.diary-save-btn {
  margin-top: 8px; width: 100%; padding: 8px 0; border-radius: 10px;
  background: var(--fog-soft); color: var(--fog-dark);
  font-size: 14px; font-weight: 500; transition: all var(--t);
}
.diary-save-btn:active { transform: scale(0.97); }
.diary-list { margin-top: 12px; }
.diary-item {
  background: var(--card); border-radius: 10px; padding: 10px 12px;
  margin-bottom: 8px; box-shadow: var(--shadow-soft);
}
.diary-item .di-head { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.diary-item .di-head .who { font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.diary-item .di-head .when { font-size: 11px; color: var(--ink-faint); margin-left: auto; }
.diary-item .di-text { font-size: 13.5px; line-height: 1.55; color: var(--ink); }
.diary-item .di-tag {
  display: inline-block; font-size: 10px; padding: 2px 8px; border-radius: 8px;
  background: var(--fog-soft); color: var(--fog-dark); margin-left: 6px;
}
.diary-empty { text-align: center; font-size: 13px; color: var(--ink-faint); padding: 16px 0; }

/* ====================== 邀约（Tab3）====================== */
.invitation-list { padding-bottom: 8px; }
.inv-card {
  background: linear-gradient(135deg, #ECE7F3, #F6EEF2);
  border-radius: var(--radius); padding: 14px; margin-bottom: 12px;
  box-shadow: var(--shadow-soft);
}
.inv-card .inv-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.inv-card .inv-ico {
  width: 36px; height: 36px; border-radius: 10px; background: var(--card);
  display: flex; align-items: center; justify-content: center; color: var(--fog-dark); flex-shrink: 0;
}
.inv-card .inv-title { flex: 1; font-size: 14px; font-weight: 600; color: var(--ink); }
.inv-card .inv-status {
  font-size: 11px; padding: 3px 10px; border-radius: 10px; font-weight: 500;
}
.inv-card .inv-status.st-pending { background: #FBE6CC; color: #C2761B; }
.inv-card .inv-status.st-accepted { background: #DCEAE0; color: #4F8A66; }
.inv-card .inv-status.st-rejected { background: var(--fog-soft); color: var(--ink-faint); }
.inv-card .inv-meta { font-size: 12px; color: var(--ink-soft); display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.inv-card .inv-msg {
  font-size: 13.5px; line-height: 1.6; color: var(--ink); background: rgba(255,255,255,0.7);
  border-radius: 10px; padding: 10px 12px;
}
.inv-card .inv-hint { font-size: 12.5px; color: var(--fog-dark); margin-top: 8px; font-style: italic; }
.inv-card .inv-actions { display: flex; gap: 8px; margin-top: 12px; }
.inv-card .inv-actions .btn { flex: 1; }

/* 邀约 Tab 底部三个按钮：等宽、统一 48px 高、圆角 12px、文字单行、左右 16px 边距 */
.bottom-bar.inv-mode { padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
.invitation-actions { display: flex; gap: 10px; width: 100%; }
.invitation-actions .btn {
  flex: 1;
  height: 48px;
  border-radius: 12px;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 4px;
  gap: 4px;
}
.invitation-actions .btn svg,
.invitation-actions .btn [class^="ico-"] { flex-shrink: 0; }

/* 全屏特效遮罩：限定在 .app 容器内（挂在 .app 下，position:absolute） */
.effect-layer {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: effectFadeIn 0.4s ease-out forwards;
  overflow: hidden;
}
.effect-box {
  position: relative;
  max-width: 70%;
  max-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: effectIn 0.4s ease-out forwards;
}
/* 透明底 PNG：不加任何背景/圆角/阴影，直接显示原图 */
.effect-box img {
  max-width: 70%;
  max-height: 60vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
/* accept / reject 特效更大 */
.effect-box img.effect-type-accept,
.effect-box img.effect-type-reject {
  max-width: 88%;
  max-height: 78vh;
}
/* 图片缺失时的渐变降级卡片 */
.effect-fallback {
  min-width: 240px;
  padding: 36px 24px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 2px;
}
.effect-fallback.fb-flower { background: linear-gradient(160deg, #FFB6C1 0%, #FF6F91 100%); }
.effect-fallback.fb-card   { background: linear-gradient(160deg, #FFE29A 0%, #E6A74B 100%); color: #5A3E00; }
.effect-fallback.fb-chat   { background: linear-gradient(160deg, #C9BFDF 0%, #6B5B8A 100%); }
.effect-fallback.fb-accept { background: linear-gradient(160deg, #B9E8C8 0%, #63B58F 100%); }
.effect-fallback.fb-reject { background: linear-gradient(160deg, #F1C9CE 0%, #C77C82 100%); }

.effect-layer.leaving { animation: effectFadeOut 0.4s ease-in forwards; }
.effect-layer.leaving .effect-box { animation: effectOut 0.4s ease-in forwards; }

@keyframes effectIn  { 0%{transform:scale(0.8);opacity:0;} 100%{transform:scale(1);opacity:1;} }
@keyframes effectOut { 0%{transform:scale(1);opacity:1;}   100%{transform:scale(1.1);opacity:0;} }
@keyframes effectFadeIn  { 0%{opacity:0;} 100%{opacity:1;} }
@keyframes effectFadeOut { 0%{opacity:1;} 100%{opacity:0;} }

/* 密语列表里的系统提示 */
.msg-system { text-align: center; margin: 12px 0; }
.msg-system .msg-system-text {
  display: inline-block; font-size: 12px; color: var(--fog-dark);
  background: var(--fog-soft); padding: 6px 14px; border-radius: 14px;
}

/* 喃呱（默认搭档）相关样式 */
/* 空间头部喃呱头像可点击 */
.avatar.nangua-av {
  cursor: pointer; position: relative; flex: 0 0 auto;
  transition: transform 0.2s ease;
}
.avatar.nangua-av:hover { transform: scale(1.06); }
/* 喃呱头像未读红点：仅在 .has-unread 时显示，与泡泡/密语 Tab 红点同步 */
.avatar.nangua-av::after {
  content: ''; position: absolute; right: -2px; bottom: -2px;
  width: 12px; height: 12px; background: var(--danger);
  border: 2px solid var(--card); border-radius: 50%;
  display: none; box-shadow: 0 0 0 0 rgba(212,136,142,0.5);
}
.avatar.nangua-av.has-unread::after {
  display: block;
  animation: dotPulse 1.6s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212,136,142,0.45); }
  50%      { box-shadow: 0 0 0 6px rgba(212,136,142,0); }
}

/* 新手教学：弹窗分步引导 */
.onboard-mask {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9998;
  background: rgba(0, 0, 0, 0.45);
  display: flex; align-items: center; justify-content: center;
  padding: 0 20px;
  animation: onboardFade 0.25s ease-out forwards;
}
.onboard-popup {
  position: relative;
  width: 80%; max-width: 320px;
  background: var(--card);
  border-radius: 20px;
  padding: 28px 22px 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  text-align: center;
  animation: onboardPop 0.3s ease-out forwards;
}
.onboard-skip {
  position: absolute; top: 10px; right: 12px;
  font-size: 12px; color: var(--ink-faint);
  background: transparent; padding: 4px 6px;
}
.onboard-skip:active { color: var(--ink-soft); }
.onboard-avatar {
  width: 64px; height: 64px; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
}
.onboard-avatar .avatar { width: 64px !important; height: 64px !important; }
.onboard-text {
  font-size: 14px; line-height: 1.7; color: var(--ink);
  margin-bottom: 18px;
  white-space: pre-line;
}
.onboard-next { width: 100%; }
@keyframes onboardFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes onboardPop { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }

/* 高亮目标：2px 主色描边 + 呼吸动画（opacity 0.6-1 循环） */
.onboard-hl {
  position: relative;
  z-index: 50;
  box-shadow: 0 0 0 2px var(--fog), 0 0 0 6px rgba(155, 142, 196, 0.25);
  animation: onboardPulse 1.6s ease-in-out infinite;
}
@keyframes onboardPulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(155,142,196,0.6), 0 0 0 6px rgba(155,142,196,0.15); }
  50%      { box-shadow: 0 0 0 2px var(--fog),        0 0 0 10px rgba(155,142,196,0.35); }
}
/* 漂浮泡泡为绝对定位，高亮时需保持 absolute，避免被 .onboard-hl 的 position:relative 破坏布局 */
.pool-bubble.onboard-hl { position: absolute; z-index: 60; }

/* 喃呱互动菜单 */
.nangua-menu { display: flex; flex-direction: column; gap: 10px; padding: 2px 2px 4px; }
.nm-btn {
  height: 44px; border-radius: 12px; font-size: 14px; padding: 0 14px;
  background: #FFFFFF; color: var(--ink); border: 1px solid var(--fog-light);
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer; transition: all 0.2s ease; font-family: inherit;
  text-align: left;
}
.nm-btn:hover { background: var(--fog-soft); border-color: var(--fog-dark); transform: translateY(-1px); }
.nm-btn:active { transform: translateY(0); }
.nm-btn svg { color: var(--fog-dark); }

/* ===== 写泡泡弹窗内各行的对齐 ===== */
/* 选择图片行：按钮与右侧缩略图间距 10px + 垂直居中，无文字状态 */
.compose-imgrow {
  display: flex;
  align-items: center;
  gap: 10px;
}
.compose-imgrow .btn {
  flex: 0 0 auto;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.compose-imgrow .btn svg {
  vertical-align: middle;
  display: block;
}
/* 选中图片后的缩略图：24×24 圆角 */
.bubble-thumb {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--fog-light);
  background: var(--fog-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.bubble-thumb img {
  width: 24px;
  height: 24px;
  object-fit: cover;
  display: block;
}
/* 私密泡泡行：图标 / 文字 / 复选框三者垂直居中，文字与复选框间距 8px */
.private-row {
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  padding: 10px 12px;
  margin: 0;
  border-radius: 12px;
  background: var(--card);
  cursor: pointer;
  user-select: none;
  font-size: 14px;
  color: var(--ink);
}
.private-row > .ico { flex: 0 0 auto; display: inline-flex; align-items: center; }
.private-row > .ptxt {
  flex: 0 1 auto;
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
}
.private-row > input[type="checkbox"] {
  margin-left: auto !important;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  accent-color: var(--primary);
}

/* ===== 顶部通知条（如：喃呱发布了一条泡泡，快去看看吧） ===== */
.notice-bar {
  position: absolute;
  top: 60px;
  left: 12px;
  right: 12px;
  z-index: 800;
  background: var(--card);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(107,91,138,0.18);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  animation: noticeSlide 0.35s ease-out forwards;
}
.notice-bar .avatar { width: 32px; height: 32px; flex: 0 0 32px; }
.notice-bar .nb-text { flex: 1; min-width: 0; line-height: 1.5; }
.notice-bar .nb-text b { color: var(--fog-dark); }
.notice-bar .nb-close {
  flex: 0 0 auto;
  width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-faint);
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}
@keyframes noticeSlide {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== 喃呱好友申请弹窗（个人主页注册后首弹） ===== */
.appmask {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9998;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  animation: onboardFade 0.25s ease-out forwards;
}
.appmask .app-pop {
  width: 80%;
  max-width: 320px;
  background: var(--card);
  border-radius: 20px;
  padding: 26px 20px 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  text-align: center;
  animation: onboardPop 0.3s ease-out forwards;
}
.appmask .app-av { width: 68px; height: 68px; margin: 0 auto 12px; }
.appmask .app-av .avatar { width: 68px !important; height: 68px !important; }
.appmask .app-name { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.appmask .app-msg { font-size: 14px; line-height: 1.6; color: var(--ink); margin-bottom: 18px; }
.appmask .app-btns { display: flex; gap: 10px; }
.appmask .app-btns .btn { flex: 1; }
