/* ============ 喵呜日记 Web 版 · 活泼可爱风 + 多皮肤系统 ============ */
:root {
  --bg: #FFF4EC;
  --bg-2: #FFE9F3;
  --card: #FFFFFF;
  --text: #5B4636;
  --sub: #C4A99A;
  --primary: #FF8FAB;
  --primary-2: #FF6A88;
  --grad: linear-gradient(135deg, #FFB199, #FF6A88);
  --tag-bg: #FFE7EE;
  --tag-text: #E2587C;
  --shadow: rgba(255, 138, 166, 0.18);
  --line: #FFF0F3;
  --input-bg: #FFF7F9;
}

/* 皮肤预设（12 纯色 + 12 泡泡） */
[data-theme="peach"]    { --bg:#FFF4EC; --bg-2:#FFE9F3; --primary:#FF8FAB; --primary-2:#FF6A88; --tag-bg:#FFE7EE; --tag-text:#E2587C; --shadow:rgba(255,138,166,.18); }
[data-theme="pink"]     { --bg:#FFF0F6; --bg-2:#FFE0EC; --primary:#F472B6; --primary-2:#DB2777; --tag-bg:#FCE7F3; --tag-text:#C026D3; --shadow:rgba(244,114,182,.18); }
[data-theme="mint"]     { --bg:#F0FBF5; --bg-2:#DFF7EA; --primary:#34D399; --primary-2:#059669; --tag-bg:#D1FAE5; --tag-text:#047857; --shadow:rgba(52,211,153,.18); }
[data-theme="grape"]    { --bg:#F7F3FF; --bg-2:#EBE3FF; --primary:#8B5CF6; --primary-2:#7C3AED; --tag-bg:#EDE9FE; --tag-text:#6D28D9; --shadow:rgba(139,92,246,.18); }
[data-theme="honey"]    { --bg:#FFF9E8; --bg-2:#FFF0C2; --primary:#FBBF24; --primary-2:#F59E0B; --tag-bg:#FEF3C7; --tag-text:#B45309; --shadow:rgba(251,191,36,.22); }
[data-theme="berry"]    { --bg:#FFF0F0; --bg-2:#FFDFE0; --primary:#FB7185; --primary-2:#F43F5E; --tag-bg:#FFE4E6; --tag-text:#E11D48; --shadow:rgba(251,113,133,.18); }
[data-theme="sky"]      { --bg:#F0F9FF; --bg-2:#E0F2FE; --primary:#38BDF8; --primary-2:#0284C7; --tag-bg:#E0F2FE; --tag-text:#0369A1; --shadow:rgba(56,189,248,.18); }
[data-theme="ocean"]    { --bg:#F0FDFA; --bg-2:#CCFBF1; --primary:#2DD4BF; --primary-2:#0D9488; --tag-bg:#CCFBF1; --tag-text:#0F766E; --shadow:rgba(45,212,191,.18); }
[data-theme="lime"]     { --bg:#F7FEE7; --bg-2:#ECFCCB; --primary:#A3E635; --primary-2:#65A30D; --tag-bg:#ECFCCB; --tag-text:#4D7C0F; --shadow:rgba(163,230,53,.22); }
[data-theme="sunset"]   { --bg:#FFF7ED; --bg-2:#FFEDD5; --primary:#FB923C; --primary-2:#EA580C; --tag-bg:#FFEDD5; --tag-text:#C2410C; --shadow:rgba(251,146,60,.2); }
[data-theme="lavender"] { --bg:#FAF5FF; --bg-2:#F3E8FF; --primary:#C084FC; --primary-2:#A855F7; --tag-bg:#F3E8FF; --tag-text:#7E22CE; --shadow:rgba(192,132,252,.18); }
[data-theme="choco"]    { --bg:#FAF6F3; --bg-2:#F0E6DF; --primary:#A16A5A; --primary-2:#7F4E3E; --tag-bg:#F0E6DF; --tag-text:#6B3F2E; --shadow:rgba(161,106,90,.18); }
/* 泡泡主题（同色系变量 + body.theme-bubbles 背景） */
[data-theme="b-peach"]    { --bg:#FFF4EC; --bg-2:#FFE9F3; --primary:#FF8FAB; --primary-2:#FF6A88; --tag-bg:#FFE7EE; --tag-text:#E2587C; --shadow:rgba(255,138,166,.18); --bubble:#FF8FAB; }
[data-theme="b-pink"]     { --bg:#FFF0F6; --bg-2:#FFE0EC; --primary:#F472B6; --primary-2:#DB2777; --tag-bg:#FCE7F3; --tag-text:#C026D3; --shadow:rgba(244,114,182,.18); --bubble:#F472B6; }
[data-theme="b-mint"]     { --bg:#F0FBF5; --bg-2:#DFF7EA; --primary:#34D399; --primary-2:#059669; --tag-bg:#D1FAE5; --tag-text:#047857; --shadow:rgba(52,211,153,.18); --bubble:#34D399; }
[data-theme="b-grape"]    { --bg:#F7F3FF; --bg-2:#EBE3FF; --primary:#8B5CF6; --primary-2:#7C3AED; --tag-bg:#EDE9FE; --tag-text:#6D28D9; --shadow:rgba(139,92,246,.18); --bubble:#8B5CF6; }
[data-theme="b-honey"]    { --bg:#FFF9E8; --bg-2:#FFF0C2; --primary:#FBBF24; --primary-2:#F59E0B; --tag-bg:#FEF3C7; --tag-text:#B45309; --shadow:rgba(251,191,36,.22); --bubble:#FBBF24; }
[data-theme="b-berry"]    { --bg:#FFF0F0; --bg-2:#FFDFE0; --primary:#FB7185; --primary-2:#F43F5E; --tag-bg:#FFE4E6; --tag-text:#E11D48; --shadow:rgba(251,113,133,.18); --bubble:#FB7185; }
[data-theme="b-sky"]      { --bg:#F0F9FF; --bg-2:#E0F2FE; --primary:#38BDF8; --primary-2:#0284C7; --tag-bg:#E0F2FE; --tag-text:#0369A1; --shadow:rgba(56,189,248,.18); --bubble:#38BDF8; }
[data-theme="b-ocean"]    { --bg:#F0FDFA; --bg-2:#CCFBF1; --primary:#2DD4BF; --primary-2:#0D9488; --tag-bg:#CCFBF1; --tag-text:#0F766E; --shadow:rgba(45,212,191,.18); --bubble:#2DD4BF; }
[data-theme="b-lime"]     { --bg:#F7FEE7; --bg-2:#ECFCCB; --primary:#A3E635; --primary-2:#65A30D; --tag-bg:#ECFCCB; --tag-text:#4D7C0F; --shadow:rgba(163,230,53,.22); --bubble:#A3E635; }
[data-theme="b-sunset"]   { --bg:#FFF7ED; --bg-2:#FFEDD5; --primary:#FB923C; --primary-2:#EA580C; --tag-bg:#FFEDD5; --tag-text:#C2410C; --shadow:rgba(251,146,60,.2); --bubble:#FB923C; }
[data-theme="b-lavender"] { --bg:#FAF5FF; --bg-2:#F3E8FF; --primary:#C084FC; --primary-2:#A855F7; --tag-bg:#F3E8FF; --tag-text:#7E22CE; --shadow:rgba(192,132,252,.18); --bubble:#C084FC; }
[data-theme="b-choco"]    { --bg:#FAF6F3; --bg-2:#F0E6DF; --primary:#A16A5A; --primary-2:#7F4E3E; --tag-bg:#F0E6DF; --tag-text:#6B3F2E; --shadow:rgba(161,106,90,.18); --bubble:#A16A5A; }

/* 泡泡背景：真实圆形元素（theme.js 动态创建），白色立体泡泡 */
.bg-bubble {
  display: block;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255,255,255,.98) 0%, rgba(255,255,255,.6) 26%, rgba(255,255,255,.22) 55%, rgba(255,255,255,.05) 78%, transparent 88%);
  box-shadow:
    inset -6px -8px 16px rgba(255,255,255,.28),
    inset 4px 5px 10px rgba(255,255,255,.85),
    0 4px 18px rgba(0,0,0,.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { min-height: 100%; }
/* 移动端禁止横向滚动（webview 内避免桌面宽度溢出） */
html, body { overflow-x: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Segoe UI', sans-serif;
  transition: background .4s;
}
/* 用户上传的背景图由 #miaowu-bg 图层承载（cover 铺满全屏），此处仅保留可读性蒙层 */
body.bg-photo::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(255, 250, 245, 0.86);
  z-index: -1;
}

a { color: inherit; text-decoration: none; }
img { display: block; }
button { font-family: inherit; }

#app { min-height: 100vh; }

/* ============ 顶部导航 ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-shrink: 0;
  max-width: 46%;
  min-width: 0;
}
.brand-logo { font-size: 28px; display: inline-block; animation: floaty 3s ease-in-out infinite; flex-shrink: 0; }
.brand-name {
  font-size: 22px;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-tag { font-size: 12px; color: var(--sub); flex-shrink: 0; }
.nav { display: flex; gap: 6px; margin-left: 48px; flex-shrink: 0; }
.nav-item {
  padding: 8px 13px;
  border-radius: 22px;
  font-size: 14px;
  color: #8C7B6B;
  transition: all .2s;
}
.nav-item:hover { background: var(--tag-bg); color: var(--tag-text); transform: translateY(-1px); }
.nav-item.on {
  background: var(--grad);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 16px var(--shadow);
}
/* 特色导航项（家庭共享）：渐变描边 + 呼吸光晕 + ✨ 徽标，更醒目 */
.nav-item.featured {
  position: relative;
  background: linear-gradient(135deg, rgba(255, 140, 66, .14), rgba(255, 95, 143, .14));
  border: 1.5px solid transparent;
  background-clip: padding-box;
  box-shadow: inset 0 0 0 1.5px var(--grad);
  animation: featuredGlow 2.6s ease-in-out infinite;
}
.nav-item.featured::before {
  content: '';
  position: absolute; inset: -1.5px;
  border-radius: 22px;
  padding: 1.5px;
  background: var(--grad);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.nav-item.featured:hover { transform: translateY(-1px); }
.nav-item.featured.on { background: var(--grad); color: #fff; }
.nav-item.featured.on::before { display: none; }
.nav-feat-dot {
  display: inline-block;
  font-size: 12px;
  margin-left: 4px;
  animation: featSpin 3s linear infinite;
}
@keyframes featuredGlow {
  0%, 100% { box-shadow: inset 0 0 0 1.5px var(--grad), 0 0 8px rgba(255, 140, 66, .25); }
  50% { box-shadow: inset 0 0 0 1.5px var(--grad), 0 0 18px rgba(255, 95, 143, .55); }
}
@keyframes featSpin {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(20deg) scale(1.15); }
  50% { transform: rotate(0deg); }
  75% { transform: rotate(-20deg) scale(1.15); }
  100% { transform: rotate(0deg); }
}
.back-link {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 22px;
  font-size: 13px;
  font-weight: 600;
  color: #8C7B6B;
  border: 1px solid var(--line);
  background: var(--card);
  white-space: nowrap;
  transition: all .2s;
}
.back-link:hover { color: var(--tag-text); border-color: var(--tag-text); transform: translateY(-1px); }
.header-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; margin-left: auto; }
.main-user {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 22px;
  font-size: 13px;
  font-weight: 600;
  color: var(--tag-text);
  background: var(--tag-bg);
  white-space: nowrap;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.main-user-avatar {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--tag-bg);
  background: var(--tag-bg);
}
.invite-bar {
  position: sticky;
  top: 0;
  z-index: 998;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #FFF3E2, #FFE8D0);
  color: #8C5A2B;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid #FFD9B0;
}
@media (max-width: 720px) {
  .invite-bar { flex-wrap: wrap; text-align: center; font-size: 13px; }
}

/* ============ 主站登录门槛横幅（仅浏览模式） ============ */
.login-gate-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  background: linear-gradient(135deg, #FFF3D6, #FFE8C2);
  color: #8A5A00;
  font-size: 13px;
  padding: 9px 16px;
  border-bottom: 1px solid rgba(190, 140, 40, .28);
  position: sticky;
  top: 0;
  z-index: 50;
}
.login-gate-bar .gate-link {
  color: #D97706;
  font-weight: 700;
  text-decoration: underline;
  white-space: nowrap;
}
.login-gate-bar .gate-link:hover { color: #B45309; }

/* ============ 内容区 ============ */
.content { max-width: 1100px; margin: 0 auto; padding: 28px 24px 60px; }
.content.narrow { max-width: 900px; }

/* ============ 卡片 ============ */
.card {
  background: var(--card);
  border-radius: 20px;
  padding: 20px 22px;
  margin-bottom: 18px;
  box-shadow: 0 6px 20px var(--shadow);
  border: 1px solid var(--line);
  transition: box-shadow .2s;
}
.section-title { font-size: 17px; font-weight: 700; margin-bottom: 14px; }

/* ============ 按钮 ============ */
.btn-primary {
  display: inline-block;
  text-align: center;
  border: none;
  cursor: pointer;
  background: var(--grad);
  color: #fff;
  border-radius: 24px;
  font-size: 14px;
  padding: 10px 26px;
  line-height: 1.4;
  box-shadow: 0 6px 16px var(--shadow);
  transition: transform .15s, box-shadow .15s;
}
.btn-primary:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 10px 24px var(--shadow); }
.btn-primary:active { transform: scale(.97); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.btn-block { display: block; width: 100%; }
.btn-plain {
  display: inline-block;
  text-align: center;
  border: none;
  cursor: pointer;
  background: var(--tag-bg);
  color: var(--tag-text);
  border-radius: 24px;
  font-size: 14px;
  padding: 10px 26px;
  line-height: 1.4;
  transition: background .15s;
}
.btn-plain:hover { filter: brightness(.96); }
.btn-sm { font-size: 13px; padding: 8px 18px; }

/* ============ 首页瀑布流 ============ */
.feed-header { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.feed-title { font-size: 24px; font-weight: 800; }
.feed-sub { font-size: 13px; color: var(--sub); }
/* 首页（发布页）：紧凑一页展示 */
.content.narrow .feed-title { margin-bottom: 14px; }
.content.narrow .publish-wrap { max-width: 640px; }
.waterfall { column-count: 3; column-gap: 18px; }
@media (max-width: 1000px) { .waterfall { column-count: 2; } }
@media (max-width: 640px) { .waterfall { column-count: 1; } }

/* 猫友圈：左 2/3 好友动态 + 右 1/3（邀请/好友/关注 三个独立面板） */
.friends-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  align-items: start;
}
.friends-main { min-width: 0; }
.friends-side {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ============ 家庭共享（B站式：搜索 + 左大图评论 + 右历史记录 + 弹窗） ============ */
.living-header { margin-bottom: 16px; }
.living-search { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; }
.living-search .comment-input { flex: 1; max-width: 560px; }
.living-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  align-items: start;
}
.living-main { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.living-side { min-width: 0; position: sticky; top: 96px; max-height: calc(100vh - 130px); display: flex; flex-direction: column; }
.living-side-title { font-weight: 700; font-size: 15px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.living-hist-list { overflow-y: auto; padding-right: 4px; }
.living-hist-item {
  display: flex;
  gap: 10px;
  padding: 10px 4px;
  border-bottom: 1px dashed var(--line);
  cursor: pointer;
  transition: background .15s;
}
.living-hist-item:hover { background: var(--tag-bg); border-radius: 10px; }
.living-thumb {
  width: 84px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  background: var(--input-bg);
}
.living-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.living-thumb-fb { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.living-thumb-play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px;
  background: rgba(0,0,0,.25);
}
.living-hist-body { min-width: 0; }
.living-hist-text {
  font-size: 13.5px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-all;
}
.living-hist-meta { font-size: 12px; color: var(--sub); margin-top: 4px; }
/* 大框卡片头部 */
.moment-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.moment-head .meta-left { display: flex; align-items: center; gap: 8px; }
/* 弹窗 */
.living-modal-mask {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 999;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.living-modal-card {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 720px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.living-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.living-modal-title { font-weight: 700; font-size: 15px; }
.living-modal-close { cursor: pointer; font-size: 18px; color: var(--sub); padding: 2px 8px; }
.living-modal-close:hover { color: var(--text); }
.living-modal-scroll { overflow-y: auto; padding: 16px 18px; }
.living-modal-scroll .comments-title { margin-top: 16px; }
/* living 大框/弹窗内的卡片：非跳转卡片，去掉 pointer/hover 动效 */
.living-main .moment-card,
.living-modal-scroll .moment-card { cursor: default; transform: none; margin-bottom: 0; }
.living-main .moment-card:hover,
.living-modal-scroll .moment-card:hover { transform: none; box-shadow: 0 6px 20px var(--shadow); }
/* 单图：完整显示不裁剪（object-fit: contain + 深色底） */
.living-media-one { background: #000; }
.living-media-one .media-img { height: auto; max-height: 520px; object-fit: contain; display: block; margin: 0 auto; }
/* 点赞/收藏/评论操作栏 */
.moment-actions { display: flex; align-items: center; gap: 26px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.moment-actions .action { font-size: 14px; color: #8C7B6B; cursor: pointer; transition: transform .15s; user-select: none; }
.moment-actions .action:hover { color: var(--primary); transform: translateY(-1px); }
.moment-actions .action.liked { color: #FF6B6B; }
.moment-actions .action.favored { color: #FFB800; }
@media (max-width: 900px) {
  .living-layout { grid-template-columns: 1fr; }
  .living-side { position: static; max-height: none; }
}
/* 我的好友 / 关注我的人：等高（固定高度）+ 内部滚动 */
.friends-list-card { display: flex; flex-direction: column; height: 320px; }
.friends-scroll {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding-right: 4px;
}
.friends-side .card { flex-shrink: 0; }
@media (max-width: 860px) {
  .friends-layout { grid-template-columns: 1fr; }
}

.moment-card {
  break-inside: avoid;
  background: var(--card);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 6px 20px var(--shadow);
  margin-bottom: 18px;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.moment-card:hover { transform: translateY(-4px) rotate(.4deg); box-shadow: 0 12px 30px var(--shadow); }
.media { position: relative; }
.media-img { width: 100%; height: 240px; object-fit: cover; }
.media-fallback { background: linear-gradient(135deg, var(--bg), var(--bg-2)); display: flex; align-items: center; justify-content: center; font-size: 44px; }
.video-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 48px; height: 48px; border-radius: 50%; background: rgba(0,0,0,.4); color: #fff;
  font-size: 18px; display: flex; align-items: center; justify-content: center;
}
.video-tag { position: absolute; right: 10px; top: 10px; background: rgba(0,0,0,.4); color: #fff; font-size: 11px; padding: 3px 10px; border-radius: 10px; }
.media-grid { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; }
.grid-img { width: 31.5%; height: 90px; object-fit: cover; border-radius: 10px; }
.moment-body { padding: 14px 16px 16px; }
.moment-text { font-size: 14.5px; line-height: 1.6; word-break: break-all; }
.moment-tags { margin-top: 8px; }
.chip {
  display: inline-block; font-size: 12px; color: var(--tag-text); background: var(--tag-bg);
  border-radius: 14px; padding: 3px 12px; margin: 0 6px 6px 0; cursor: pointer;
  user-select: none; transition: all .15s;
}
.chip:hover { transform: translateY(-1px); }
.chip-active { background: var(--grad); color: #fff; }
.moment-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.meta-left { display: flex; align-items: center; min-width: 0; }
.cat-avatar { width: 22px; height: 22px; border-radius: 50%; background: var(--tag-bg); object-fit: cover; }
.cat-avatar-fb { display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.cat-name { margin-left: 7px; font-size: 12px; color: #8C7B6B; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta-right { display: flex; align-items: center; gap: 10px; }
.time { font-size: 12px; color: var(--sub); }
.likes { font-size: 12px; color: var(--sub); }

.skeleton-card {
  background: linear-gradient(90deg, var(--tag-bg) 25%, var(--bg) 37%, var(--tag-bg) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s infinite;
  height: 260px;
  border-radius: 20px;
  margin-bottom: 18px;
  break-inside: avoid;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* ============ 详情页 ============ */
.detail-wrap { max-width: 760px; margin: 0 auto; }
.detail-main { }
.detail-comments { margin-top: 16px; }
.comments-more { text-align: center; color: var(--tag-text); font-size: 13px; padding: 12px 0 4px; cursor: pointer; user-select: none; }
.comments-more:hover { text-decoration: underline; }
.author { display: flex; align-items: center; }
.author-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--tag-bg); object-fit: cover; flex-shrink: 0; }
.fb { display: flex; align-items: center; justify-content: center; }
.author-info { flex: 1; min-width: 0; margin-left: 12px; }
.author-name { font-size: 16px; font-weight: 700; }
.author-time { font-size: 12px; color: var(--sub); margin-top: 2px; }
.del-btn { font-size: 12px; color: #E07A5F; border: 1px solid #F8D2C8; background: none; border-radius: 12px; padding: 4px 12px; cursor: pointer; }
.del-btn:hover { background: #FFF0EC; }
.edit-btn { margin-left: 8px; font-size: 12px; color: #6B9E78; border: 1px solid #CBE3D0; background: none; border-radius: 12px; padding: 4px 12px; cursor: pointer; }
.edit-btn:hover { background: #EEF7F0; }
/* 编辑弹窗：发布空间选择（个人空间 / 家庭共享） */
.edit-space-row { display: flex; gap: 8px; margin-top: 6px; }
.share-top-btn { margin-left: 8px; font-size: 12px; color: var(--tag-text); border: 1px solid var(--line); background: var(--tag-bg); border-radius: 12px; padding: 4px 12px; cursor: pointer; flex-shrink: 0; }
.share-top-btn:hover { filter: brightness(.96); transform: translateY(-1px); }
.text { font-size: 15.5px; line-height: 1.8; margin-top: 14px; word-break: break-all; }
.tags { margin-top: 10px; }
.video-box { margin-top: 14px; border-radius: 16px; overflow: hidden; background: #000; }
.video-box video { width: 100%; max-height: 480px; display: block; }
.img-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.img-grid img { width: 32%; height: 200px; object-fit: cover; border-radius: 12px; cursor: zoom-in; transition: transform .2s; }
.img-grid img:hover { transform: scale(1.03); }
.action-bar { display: flex; align-items: center; gap: 30px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.action { font-size: 14px; color: #8C7B6B; cursor: pointer; transition: transform .15s; }
.action:hover { color: var(--primary); transform: translateY(-1px); }
.action.liked { color: #FF6B6B; }
.likers-row { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); cursor: pointer; }
.likers-avatars { display: flex; min-width: 0; }
.liker-avatar-wrap { margin-left: -8px; }
.liker-avatar-wrap:first-child { margin-left: 0; }
.liker-avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--tag-bg); border: 2px solid #fff; box-sizing: border-box; object-fit: cover; display: inline-block; }
.liker-avatar-fb { display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.likers-text { font-size: 13px; color: #8C7B6B; margin-left: 10px; flex-shrink: 0; }
.liker-item { display: flex; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.liker-item:last-child { border-bottom: none; }
.liker-avatar-lg { width: 36px; height: 36px; border-radius: 50%; background: var(--tag-bg); object-fit: cover; flex-shrink: 0; }
.liker-name { margin-left: 10px; font-size: 14px; }

.comments-title { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.comments-empty { text-align: center; color: var(--sub); padding: 24px 0; font-size: 13px; }
.comments-list { display: flex; flex-direction: column; gap: 12px; }
.comment { display: flex; margin-bottom: 14px; }
.c-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--tag-bg); object-fit: cover; flex-shrink: 0; }
.c-body { flex: 1; min-width: 0; margin-left: 10px; }
.c-name { font-size: 13px; color: var(--sub); }
.c-time { margin-left: 8px; font-size: 11px; color: #E3D2C6; }
.c-content { font-size: 14px; line-height: 1.6; margin-top: 3px; word-break: break-all; }
.comment-form { display: flex; gap: 10px; margin-top: 14px; }
.comment-input {
  flex: 1; height: 40px; border: 2px solid var(--line); background: var(--input-bg);
  border-radius: 20px; padding: 0 16px; font-size: 14px; outline: none; transition: all .15s;
}
.comment-input:focus { border-color: var(--primary); background: #fff; }
.comment-emoji-panel { margin-top: 10px; }
.comment-emoji-toggle {
  display: inline-block;
  font-size: 13px;
  color: var(--tag-text);
  background: var(--tag-bg);
  border-radius: 16px;
  padding: 5px 12px;
  cursor: pointer;
  user-select: none;
}
.comment-emoji-toggle:hover { filter: brightness(.96); }
.comment-emoji-row { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 8px; padding: 8px 10px; background: var(--input-bg); border-radius: 12px; }
.comment-emoji-row .emoji-item { font-size: 18px; }
.detail-share { margin-top: 4px; }

.locked-card { text-align: center; padding: 60px 30px; max-width: 560px; margin: 40px auto; }
.locked-emoji { font-size: 56px; margin-bottom: 14px; animation: floaty 3s ease-in-out infinite; }
.locked-avatar { width: 76px; height: 76px; border-radius: 50%; background: var(--tag-bg); margin: 0 auto 12px; object-fit: cover; }
.locked-fb { display: flex; align-items: center; justify-content: center; font-size: 42px; }
.locked-name { font-size: 19px; font-weight: 700; }
.locked-tip { font-size: 14px; color: var(--sub); margin: 10px 0 24px; }
.locked-waiting { font-size: 14px; color: var(--tag-text); background: var(--tag-bg); border-radius: 22px; padding: 12px 0; max-width: 320px; margin: 0 auto; }

/* ============ 发布页 ============ */
.publish-wrap { max-width: 760px; margin: 0 auto; }
.media-title { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.picked-list { display: flex; flex-wrap: wrap; gap: 10px; }
.picked-item { position: relative; width: 110px; height: 110px; }
.picked-img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }
.picked-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 34px; height: 34px; border-radius: 50%; background: rgba(0,0,0,.4); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.picked-del { position: absolute; right: -6px; top: -6px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 13px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.pick-btns { display: flex; gap: 12px; margin-top: 12px; }
.pick-btn { flex: 1; text-align: center; padding: 16px 0; border-radius: 16px; background: var(--tag-bg); color: var(--tag-text); font-size: 15px; cursor: pointer; transition: all .15s; }
.pick-btn:hover { transform: translateY(-2px); filter: brightness(.97); }
.hint { font-size: 12px; color: var(--sub); margin-top: 10px; }
.desc {
  width: 100%; min-height: 90px; border: 2px solid var(--line); background: var(--input-bg);
  border-radius: 14px; padding: 12px 14px; font-size: 14.5px; outline: none; resize: vertical;
  font-family: inherit; transition: border-color .15s;
}
.desc:focus { border-color: var(--primary); background: #fff; }
.emoji-row { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 10px; padding: 8px 10px; background: var(--input-bg); border-radius: 12px; }
.emoji-item { font-size: 20px; padding: 3px 5px; border-radius: 8px; cursor: pointer; line-height: 1.2; }
.emoji-item:hover { background: var(--tag-bg); transform: scale(1.15); transition: transform .12s; }
.field { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.field-label { font-size: 14.5px; font-weight: 600; margin-bottom: 10px; }
.select { width: 100%; height: 40px; border: 2px solid var(--line); background: var(--input-bg); border-radius: 12px; padding: 0 12px; font-size: 14px; color: #8C7B6B; outline: none; cursor: pointer; }
.field-tip { font-size: 12px; color: var(--sub); margin-top: 8px; }
.tag-list { display: flex; flex-wrap: wrap; }
.upload-bar { margin: 14px 0; }
.progress-track { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.progress-bar { height: 100%; background: var(--grad); transition: width .2s; }
.progress-text { font-size: 12px; color: var(--tag-text); margin-top: 6px; }
.publish-btn { margin-top: 4px; }
.publish-actions { display: flex; gap: 12px; }
.publish-actions .btn-block { flex: 1; }

/* 首页发布页：紧凑网格布局 */
.publish-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}
.publish-grid > .card {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 14px 16px;
}
.publish-grid .field-label { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.publish-grid .select { height: 36px; font-size: 13px; }
.publish-grid .emoji-row { padding: 8px; margin-top: 8px; }
.publish-grid .emoji-item { font-size: 17px; }

/* 第一排：媒体选择（左 2/3）+ 我的猫窝（右 1/3） */
.pub-media-card { grid-column: span 2; }
.pub-mine-card { justify-content: center; grid-column: span 1; }
.pub-mine-title { font-size: 17px; font-weight: 800; }

/* 第二排：文字+表情 2/3，标签 1/3 */
.pub-text-card { grid-column: span 2; }
.pub-text-card .desc { flex: 1; min-height: 96px; }
.pub-tags-card { grid-column: span 1; }
.pub-tags-card .tag-list { flex: 1; align-content: flex-start; }

@media (max-width: 900px) {
  .publish-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pub-media-card { grid-column: span 1; }
  .pub-mine-card { grid-column: span 1; }
  .pub-text-card { grid-column: span 2; }
}
@media (max-width: 560px) {
  .publish-grid { grid-template-columns: 1fr; }
  .pub-text-card, .pub-tags-card { grid-column: span 1; }
}

/* ============ 草稿列表 ============ */
.draft-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.draft-img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.draft-img-empty { background: var(--tag-bg); display: flex; align-items: center; justify-content: center; font-size: 26px; }
.draft-body { flex: 1; min-width: 0; }
.draft-text { font-size: 14.5px; color: #6B5D4F; margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.draft-actions { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.draft-del { color: #E07856; }

/* ============ 云空间 ============ */
.space-track { height: 10px; border-radius: 5px; background: var(--line); overflow: hidden; margin-bottom: 8px; }
.space-bar { height: 100%; background: linear-gradient(90deg, #FFB26B, #FF8C42); border-radius: 5px; transition: width .3s; }

/* ============ 猫咪档案管理 ============ */
.mgmt-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mgmt-item:last-child { border-bottom: none; }
.mgmt-name { font-size: 15px; font-weight: 600; color: #6B5D4F; }
.mgmt-breed { font-size: 12px; color: var(--sub); font-weight: 400; margin-left: 8px; }
.mgmt-btns { display: flex; gap: 8px; }
/* 会所名称 / 猫咪档案：紧凑等高，减小高度 */
.mine-grid .card .comment-input { margin-bottom: 6px; }
.mine-grid .mgmt-item { padding: 6px 0; }
.cat-del { color: #E07856; }
.cat-form-field { margin-bottom: 10px; }
.cat-form-field .field-label { font-size: 13px; font-weight: 600; margin-bottom: 6px; }

/* 猫咪头像上传 */
.cat-avatar-form { position: relative; width: 84px; height: 84px; margin: 4px auto 0; }
.cat-form-avatar { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; cursor: pointer; border: 3px solid #fff; box-shadow: 0 3px 12px rgba(0,0,0,.14); }
.cat-form-avatar-fb { display: flex; align-items: center; justify-content: center; font-size: 42px; background: var(--tag-bg); }
.cat-form-avatar-edit {
  position: absolute; right: -2px; bottom: -2px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--grad); color: #fff; font-size: 13px; display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}

/* ============ 家庭成员 ============ */
.tag-owner { color: #FF8C42; font-size: 12px; font-weight: 700; }
.family-leave { color: #E07856; }
.divider { text-align: center; color: var(--sub); font-size: 13px; padding: 14px 0 8px; }

/* ============ 皮肤选择 / 背景上传 ============ */
.skin-row { display: flex; flex-wrap: wrap; gap: 12px; }
.skin-dot {
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,.15);
  transition: transform .15s;
}
.skin-dot:hover { transform: scale(1.15) rotate(10deg); }
.skin-dot.on { outline: 3px solid var(--primary); transform: scale(1.1); }
/* 泡泡皮肤小图：左上大泡泡 + 右下小泡泡 */
.skin-dot.skin-bubble { position: relative; overflow: hidden; }
.skin-dot.skin-bubble::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.95), rgba(255,255,255,.45) 55%, rgba(255,255,255,.15));
  box-shadow: inset -2px -2px 4px rgba(255,255,255,.35);
}
.skin-dot.skin-bubble::after {
  content: '';
  position: absolute;
  right: 4px;
  bottom: 3px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.9), rgba(255,255,255,.4) 55%, rgba(255,255,255,.12));
  box-shadow: inset -1px -1px 3px rgba(255,255,255,.3);
}
.skin-name { font-size: 12px; color: var(--sub); margin-top: 8px; }

.bg-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.bg-thumb {
  width: 90px; height: 56px; border-radius: 10px; background-size: cover;
  background-position: center; border: 2px solid var(--line); position: relative;
}
.bg-del {
  position: absolute; right: -7px; top: -7px; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff; font-size: 12px; display: flex;
  align-items: center; justify-content: center; cursor: pointer;
}

/* ============ 猫友圈 / 我的 ============ */
.invite-card { background: linear-gradient(135deg, #fff, var(--bg-2)); }
.invite-title { font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.invite-tip { font-size: 13.5px; color: #8C7B6B; line-height: 1.8; margin-bottom: 14px; }
.invite-url { font-size: 12.5px; color: var(--tag-text); background: #fff; border-radius: 10px; padding: 12px; margin-bottom: 12px; word-break: break-all; cursor: pointer; border: 1px dashed var(--primary); }
.mini-empty { text-align: center; color: var(--sub); font-size: 13px; padding: 20px 0; }
.friend-item { display: flex; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.friend-item:last-child { border-bottom: none; }
.f-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--tag-bg); object-fit: cover; flex-shrink: 0; }
.f-avatar-fb { display: flex; align-items: center; justify-content: center; font-size: 24px; }
.f-info { flex: 1; min-width: 0; margin-left: 12px; }
.f-name { font-size: 15px; font-weight: 600; }
.f-sub { font-size: 12px; color: var(--sub); margin-top: 2px; }
.f-btn { font-size: 13px; color: #8C7B6B; background: var(--tag-bg); border: none; border-radius: 16px; padding: 7px 16px; cursor: pointer; transition: all .15s; }
.f-btn:hover { transform: translateY(-1px); }
.f-btn-primary { color: #fff; background: var(--grad); }
.friend-count { font-size: 12px; color: var(--sub); margin-bottom: 6px; }
.profile-card { display: flex; align-items: center; }
.profile-avatar { width: 68px; height: 68px; border-radius: 50%; background: var(--tag-bg); object-fit: cover; flex-shrink: 0; }
.profile-avatar-fb { display: flex; align-items: center; justify-content: center; font-size: 36px; }
.profile-right { flex: 1; min-width: 0; margin-left: 16px; }
.profile-name { font-size: 18px; font-weight: 700; }
.link-btn { border: none; background: none; font-size: 14px; cursor: pointer; color: var(--tag-text); }
.profile-sub { font-size: 12.5px; color: var(--sub); margin-top: 4px; }
.stats-card { display: flex; text-align: center; padding: 20px 0; }
.stat { flex: 1; }
.stat-num { font-size: 26px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-label { font-size: 12.5px; color: var(--sub); margin-top: 4px; }
.maintain-emoji { font-size: 52px; margin: 20px 0 8px; }
.maintain-title { font-size: 17px; font-weight: 700; color: #6B5D4F; margin-bottom: 18px; }
.invite-code-big {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 6px;
  color: #FF8C42;
  background: var(--tag-bg);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  margin: 6px 0;
  user-select: all;
}

/* ============ 我的页：3列紧凑面板 ============ */
.mine-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}
.mine-grid > .card {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 14px 16px;
}
.mine-grid .section-title { font-size: 14px; margin-bottom: 10px; }
.mine-grid .mini-empty { font-size: 12px; padding: 8px 0; }
.mine-grid .comment-form { margin-top: 8px; }

/* 用户名面板 */
.mine-user { align-items: center; text-align: center; }
.mine-avatar-wrap { position: relative; width: 64px; height: 64px; margin: 2px auto 8px; }
.mine-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; cursor: pointer; border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,.12); }
.mine-avatar-fb { display: flex; align-items: center; justify-content: center; font-size: 32px; background: var(--tag-bg); }
.mine-avatar-edit {
  position: absolute; right: -4px; bottom: -2px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--grad); color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.mine-name { font-size: 16px; font-weight: 800; }
.mine-sub { font-size: 11px; color: var(--sub); margin: 2px 0 8px; }
.mine-quick { display: flex; gap: 6px; justify-content: center; }

/* 云空间 + 统计 合并面板（第一排一格） */
.mine-space-stats { display: flex; flex-direction: column; justify-content: center; }
.mine-space-row .space-track { margin: 6px 0; }
.mine-space-stats .mine-stats {
  display: flex;
  justify-content: space-around;
  text-align: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.mine-space-stats .stat-num { font-size: 24px; }

/* 消息面板：从第一排开始贯穿全部三排（右侧第三列），高度与左侧 3x2 面板一致 */
.mine-msg { grid-row: 1 / span 3; grid-column: 3; }
.mine-notif-scroll {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  max-height: calc(100vh - 260px);
  padding-right: 4px;
}

@media (max-width: 900px) {
  .mine-msg { grid-column: span 2; grid-row: auto; }
}
@media (max-width: 560px) {
  .mine-msg { grid-column: span 1; }
}

/* 统计面板 */
.mine-stats { flex-direction: row !important; align-items: center; justify-content: space-around; text-align: center; }
.mine-stats .stat-num { font-size: 24px; }

@media (max-width: 900px) {
  .mine-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .mine-grid { grid-template-columns: 1fr; }
}
.mini-item { display: flex; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.mini-item:last-child { border-bottom: none; }
.mini-item:hover { background: var(--bg); }
/* 消息未读小红点（置于条目最前） */
.notif-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #FF6B6B;
  flex-shrink: 0;
  margin-right: 8px;
  box-shadow: 0 0 0 2px rgba(255, 107, 107, .18);
}
.mini-img { width: 56px; height: 56px; border-radius: 14px; background: var(--tag-bg); object-fit: cover; flex-shrink: 0; }
.mini-img-empty { display: flex; align-items: center; justify-content: center; font-size: 30px; }
.mini-body { flex: 1; min-width: 0; margin-left: 12px; }
.mini-text { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-meta { font-size: 12px; color: var(--sub); margin-top: 4px; }

/* 我的发布：按月折叠 */
.mypost-group { padding: 14px 18px; }
.mypost-month {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  font-size: 15px; font-weight: 700; padding: 6px 0; user-select: none;
}
.mypost-month:hover { color: var(--primary); }
.mypost-month-title { flex: 1; }
.mypost-count { font-size: 12px; color: var(--sub); font-weight: 400; }
.mypost-arrow { font-size: 13px; color: var(--sub); transition: transform .2s; }
.month-cur { font-size: 11px; color: #fff; background: var(--grad); border-radius: 10px; padding: 2px 8px; font-weight: 600; }
.month-check { font-size: 12px; color: var(--primary); margin-left: 4px; padding: 2px 8px; border: 1px dashed var(--primary); border-radius: 10px; cursor: pointer; }
.month-check:hover { background: var(--tag-bg); }
/* 批量删除 */
.batch-bar { display: flex; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); flex-wrap: wrap; }
.btn-danger { font-size: 13px; color: #fff; background: #E07856; border: none; border-radius: 999px; padding: 8px 16px; cursor: pointer; transition: all .2s; }
.btn-danger:hover { background: #C75F3E; transform: translateY(-1px); }
.mypost-row { position: relative; }
.mypost-check { width: 16px; height: 16px; margin-right: 10px; accent-color: var(--primary); flex-shrink: 0; cursor: pointer; }
.month-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; margin-bottom: 12px; }
.month-controls { display: flex; gap: 8px; flex-wrap: wrap; }
.month-btn { font-size: 13px; color: var(--tag-text); background: var(--tag-bg); border-radius: 16px; padding: 6px 14px; cursor: pointer; user-select: none; }
.month-btn:hover { filter: brightness(.96); }
.month-picker { background: var(--grad); color: #fff; font-weight: 600; }

/* 月份选择弹层 */
.month-year-row { display: flex; gap: 8px; margin-bottom: 10px; }
.month-year-btn { font-size: 13px; color: var(--tag-text); background: var(--tag-bg); border-radius: 12px; padding: 5px 12px; cursor: pointer; }
.month-year-btn.on { background: var(--grad); color: #fff; }
.month-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.month-cell { text-align: center; padding: 10px 0; border-radius: 10px; background: var(--input-bg); color: #8C7B6B; font-size: 14px; cursor: pointer; transition: all .15s; }
.month-cell:hover { background: var(--tag-bg); }
.month-cell.on { background: var(--grad); color: #fff; font-weight: 700; }

/* ============ 空状态 / Toast ============ */
.empty { text-align: center; padding: 90px 20px; color: var(--sub); }
.empty-emoji { font-size: 64px; margin-bottom: 14px; animation: floaty 3s ease-in-out infinite; }
.empty-text { font-size: 15.5px; margin-bottom: 22px; color: var(--text); }
.empty-sub { font-size: 13px; color: var(--sub); margin: -8px 0 22px; }
.load-more { text-align: center; color: var(--sub); font-size: 13px; padding: 22px 0 10px; }
.load-more-btn {
  border: 1px dashed var(--border, rgba(128,128,128,.4));
  background: var(--card);
  color: var(--accent, #ff7ba9);
  font-size: 13.5px;
  padding: 9px 26px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .2s;
}
.load-more-btn:hover { background: var(--accent, #ff7ba9); color: #fff; border-color: transparent; }
.load-more-btn:disabled { opacity: .55; cursor: default; }
.load-more-end { padding: 4px 0; color: var(--sub); }
.loading-screen { text-align: center; padding-top: 180px; color: var(--sub); font-size: 16px; }

.toast {
  position: fixed; left: 50%; top: 15%; transform: translateX(-50%);
  background: rgba(0,0,0,.75); color: #fff; font-size: 13.5px; border-radius: 12px;
  padding: 10px 20px; z-index: 999; max-width: 80%; text-align: center;
}
.toast.hidden { display: none; }
.hidden { display: none !important; }

/* ============ 手机适配 ============ */
@media (max-width: 900px) {
  .header-inner { flex-wrap: wrap; gap: 8px; }
  .brand { max-width: 100%; }
  .nav { width: 100%; justify-content: space-between; margin-left: 0; }
}
@media (max-width: 640px) {
  .header-inner { padding: 10px 14px; flex-wrap: wrap; gap: 8px; }
  .brand { max-width: 100%; }
  .brand-tag { display: none; }
  /* 手机版：品牌与导航分两行；导航多行换行（无需横滑），菜单更 App 化 */
  .nav { width: 100%; justify-content: flex-start; margin-left: 0; flex-wrap: wrap; gap: 6px; }
  .nav-item { padding: 6px 12px; font-size: 13px; }
  .header-right { margin-left: 0; }
  .back-link { padding: 6px 12px; font-size: 12px; }
  .content { padding: 16px 12px 40px; }
  .card { padding: 14px; border-radius: 16px; }
  .feed-title { font-size: 20px; }
  .media-img { height: 200px; }
  .img-grid img { height: 120px; }
  /* 手机版首页：发布表单单列铺满 */
  .publish-grid { grid-template-columns: 1fr; }
  .pub-media-card, .pub-mine-card, .pub-text-card, .pub-tags-card { grid-column: span 1; }
  /* 手机版「我的」页单列 */
  .mine-grid { grid-template-columns: 1fr; }
  .mine-msg { grid-column: span 1; grid-row: auto; }
}

/* 编辑弹窗：未加入家庭时家庭共享置灰 */
.chip-disabled{opacity:.45;cursor:not-allowed}

/* ===== 手机端底部导航（4 快捷入口；其余入口在顶部导航）===== */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 120;
  display: none;
  background: var(--card, #ffffff);
  border-top: 1px solid var(--line, #f0e6dd);
  box-shadow: 0 -4px 16px rgba(180, 120, 90, 0.08);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 0 6px;
  color: var(--sub, #c4a99a);
  text-decoration: none;
  transition: color .15s;
}
.bottom-nav-item .bn-icon { font-size: 21px; line-height: 1.2; }
.bottom-nav-item .bn-name { font-size: 11px; margin-top: 2px; }
.bottom-nav-item.on { color: var(--primary, #ff8fab); font-weight: 600; }
@media (max-width: 900px) {
  .bottom-nav { display: flex; }
  .content { padding-bottom: 66px; }
}

/* 微信小程序 web-view 适配：隐藏自身底部导航后，内容底部留白避让小程序 tabBar
   （app.js 检测到 wx.miniProgram 时给 .content 添加 .in-wx-webview） */
.content.in-wx-webview { padding-bottom: 130px; }