/* ============================================================
   wangfanstar.cloud · 王凡一家成长日志
   Theme: 温暖家庭风 (warm cream + per-member accent colors)
   ============================================================ */

:root {
  --bg: #faf6f0;
  --bg-soft: #fffdf9;
  --ink: #3d3833;
  --ink-soft: #7a7268;
  --line: #ece4d8;
  --gold: #d9a441;
  --hero-grad: linear-gradient(135deg, #f6e3c5 0%, #f3d5a5 45%, #e8b98a 100%);
  --card-shadow: 0 8px 30px rgba(93, 70, 40, 0.08);
  --card-shadow-hover: 0 16px 44px rgba(93, 70, 40, 0.16);
  --radius: 22px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
          "Source Han Sans SC", -apple-system, "Segoe UI", Roboto, sans-serif;
  /* member accents */
  --c-dad: #3b82c4;    /* 爸爸 - 沉稳蓝 */
  --c-mom: #e0658f;    /* 妈妈 - 温柔粉 */
  --c-son: #2fa39a;    /* 儿子 - 活力青 */
  --c-daughter: #8a6fd1; /* 女儿 - 梦幻紫 */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;   /* 防横向溢出导致手机端整体缩小为桌面布局 */
  overflow-x: clip;     /* clip 不产生滚动容器，position:sticky 才能正常工作（hidden 会破坏 sticky） */
}

img { max-width: 100%; }

a { text-decoration: none; color: inherit; }

/* ---------- 顶部导航 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 5vw;
  background: rgba(255, 253, 249, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.5px;
}

.nav .brand .logo {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--hero-grad);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.5);
}

.nav .links { display: flex; gap: 26px; font-size: .95rem; color: var(--ink-soft); }
.nav .links a { transition: color .2s; }
.nav .links a:hover, .nav .links a.active { color: var(--ink); font-weight: 600; }

.nav .domain-tag {
  font-size: .78rem;
  color: #a07d3c;
  background: #fdf3df;
  border: 1px solid #f0dcb2;
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: .5px;
}

/* ---------- Hero ---------- */
.hero {
  background: var(--hero-grad);
  padding: 72px 5vw 84px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before, .hero::after {
  content: "✦";
  position: absolute;
  font-size: 2.4rem;
  opacity: .35;
  animation: twinkle 4s ease-in-out infinite;
}
.hero::before { top: 40px; left: 12%; }
.hero::after  { bottom: 46px; right: 12%; animation-delay: 1.6s; }

@keyframes twinkle { 0%,100% {opacity:.18; transform: scale(.9);} 50% {opacity:.5; transform: scale(1.1);} }

.hero .family-emojis { font-size: 3.4rem; margin-bottom: 14px; letter-spacing: 10px; }

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: 2px;
  color: #4a3a20;
}

.hero h1 .dot { color: var(--gold); }

.hero .subtitle {
  margin-top: 12px;
  font-size: 1.1rem;
  color: #7a623c;
  letter-spacing: 1px;
}

.hero .subtitle .domain {
  display: inline-block;
  margin-top: 8px;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: .95rem;
  color: #8a6a34;
  background: rgba(255,255,255,.5);
  border: 1px dashed #c9a55e;
  padding: 4px 16px;
  border-radius: 999px;
}

.hero .motto {
  margin: 26px auto 0;
  max-width: 640px;
  font-size: 1.02rem;
  color: #6b5633;
  font-style: italic;
  background: rgba(255,255,255,.35);
  padding: 14px 26px;
  border-radius: 16px;
  backdrop-filter: blur(4px);
}

/* ---------- 通用区块 ---------- */
.section { padding: 64px 5vw; max-width: 1180px; margin: 0 auto; }
@media (min-width: 1024px) { .section#feedSection { max-width: 1340px; } }

.section-head { text-align: center; margin-bottom: 42px; }
.section-head .kicker {
  font-size: .85rem;
  letter-spacing: 4px;
  color: var(--gold);
  font-weight: 700;
  text-transform: uppercase;
}
.section-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin-top: 6px; font-weight: 800; }
.section-head p { color: var(--ink-soft); margin-top: 8px; font-size: .98rem; }

/* ---------- 家庭成员卡片 ---------- */
.member-group { margin-bottom: 42px; }

.member-group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 20px;
  letter-spacing: 1px;
}
.mgt-emoji { font-size: 1.5rem; }
.mgt-count {
  font-size: .78rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 12px;
}

/* 家庭成员卡片：每行固定 2 条 */
.members {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
}
@media (max-width: 480px) {
  .members { grid-template-columns: 1fr; }
}

.member-card {
  position: relative;
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 36px 26px 30px;
  text-align: center;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--line);
  transition: transform .3s ease, box-shadow .3s ease;
  overflow: hidden;
}

.member-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: var(--mc);
}

.member-card:hover { transform: translateY(-6px); box-shadow: var(--card-shadow-hover); }

.member-card .avatar {
  width: 92px;
  height: 92px;
  margin: 8px auto 16px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--mc), color-mix(in srgb, var(--mc) 55%, white));
  display: grid;
  place-items: center;
  font-size: 2.6rem;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--mc) 30%, transparent);
}

.member-card .role {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  color: var(--mc);
  background: color-mix(in srgb, var(--mc) 12%, white);
  border: 1px solid color-mix(in srgb, var(--mc) 35%, white);
  padding: 2px 14px;
  border-radius: 999px;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.member-card h3 { font-size: 1.45rem; font-weight: 800; }

.member-card .meta {
  font-size: .82rem;
  color: var(--ink-soft);
  margin-top: 4px;
  font-family: ui-monospace, Consolas, monospace;
}

.member-card .bio { font-size: .92rem; color: var(--ink-soft); margin: 14px 0 18px; min-height: 3.4em; }

.member-card .go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .9rem;
  font-weight: 700;
  color: var(--mc);
  transition: gap .25s;
}
.member-card .go:hover { gap: 12px; }

/* ---------- 最新动态 (首页) ---------- */
.feed { display: grid; gap: 18px; max-width: 860px; margin: 0 auto; }

/* 搜索过滤栏 */
.feed-filter {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 860px;
  margin: -16px auto 26px;
}
.feed-search-input {
  flex: 1;
  min-width: 200px;
  font-family: inherit;
  font-size: .92rem;
  color: var(--ink);
  background: var(--bg-soft);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 10px 18px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.feed-search-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(217, 164, 65, .15);
}
.feed-filter-select {
  font-family: inherit;
  font-size: .85rem;
  color: var(--ink-soft);
  background: var(--bg-soft);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  outline: none;
  cursor: pointer;
  max-width: 170px;
  transition: border-color .2s;
}
.feed-filter-select:focus { border-color: var(--gold); }

.feed-item {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px 24px;
  box-shadow: var(--card-shadow);
  transition: transform .25s;
}
.feed-item:hover { transform: translateX(6px); }

.feed-item .f-avatar {
  flex: none;
  width: 52px; height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  background: linear-gradient(145deg, var(--mc), color-mix(in srgb, var(--mc) 55%, white));
}

.feed-item .f-body { flex: 1; min-width: 0; }

.feed-item .f-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.tl-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 6px;
  object-fit: cover;
}

.feed-item .f-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.feed-item .f-name { font-weight: 800; }
.feed-item .f-role { font-size: .78rem; color: var(--mc); font-weight: 600; }
.feed-item .f-date { font-size: .78rem; color: #b0a795; font-family: ui-monospace, Consolas, monospace; margin-left: auto; }

.feed-item .f-title { font-weight: 700; margin-top: 4px; font-size: 1.02rem; }
.feed-item .f-content { color: var(--ink-soft); font-size: .92rem; margin-top: 4px; }

.feed-item .f-tag {
  display: inline-block;
  font-size: .72rem;
  color: var(--ink-soft);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 10px;
  margin-top: 8px;
}

/* ---------- 关于 / 家族格言 ---------- */
.about {
  background: linear-gradient(180deg, transparent, #f6ecda55, transparent);
  text-align: center;
}
.about .quote {
  max-width: 680px;
  margin: 0 auto;
  font-size: 1.15rem;
  color: #6b5633;
  line-height: 2.1;
}
.about .quote .q-mark { color: var(--gold); font-size: 1.6rem; font-weight: 800; }
.about .sign { margin-top: 14px; font-size: .9rem; color: var(--ink-soft); letter-spacing: 2px; }

/* ---------- 页脚 ---------- */
.footer {
  text-align: center;
  padding: 36px 5vw 42px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: .86rem;
}
.footer .foot-logo { font-size: 1.05rem; font-weight: 800; color: var(--ink); margin-bottom: 6px; }
.footer .foot-domain { font-family: ui-monospace, Consolas, monospace; color: var(--gold); }
.footer .foot-icp { margin-top: 8px; font-size: .8rem; }
.footer .foot-icp a { color: var(--ink-soft); text-decoration: none; }
.footer .foot-icp a:hover { color: var(--gold); text-decoration: underline; }

/* ============================================================
   成员详情页
   ============================================================ */

.member-hero {
  padding: 58px 5vw 70px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.member-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 20%, rgba(255,255,255,.25), transparent 40%),
    linear-gradient(135deg, var(--mc) 0%, color-mix(in srgb, var(--mc) 72%, #3a2f22) 100%);
}

.member-hero::after {
  content: "✦";
  position: absolute;
  font-size: 3rem;
  opacity: .3;
  top: 30px; right: 10%;
  animation: twinkle 4s ease-in-out infinite;
}

.member-hero .inner { position: relative; max-width: 900px; margin: 0 auto; display: flex; gap: 34px; align-items: center; flex-wrap: wrap; }

.member-hero .big-avatar {
  width: 130px; height: 130px;
  border-radius: 32px;
  background: rgba(255,255,255,.18);
  border: 2px solid rgba(255,255,255,.55);
  display: grid;
  place-items: center;
  font-size: 3.6rem;
  box-shadow: 0 14px 34px rgba(0,0,0,.18);
  backdrop-filter: blur(4px);
}

.member-hero .mh-info { flex: 1; min-width: 260px; }
.member-hero .mh-role {
  font-size: .85rem;
  letter-spacing: 3px;
  font-weight: 700;
  background: rgba(255,255,255,.2);
  display: inline-block;
  padding: 3px 16px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.member-hero h1 { font-size: clamp(2rem, 4.5vw, 2.9rem); font-weight: 800; letter-spacing: 2px; }
.member-hero .mh-meta { margin-top: 10px; font-size: .92rem; opacity: .92; display: flex; gap: 22px; flex-wrap: wrap; }
.member-hero .mh-meta span b { font-weight: 700; }
.member-hero .mh-bio { margin-top: 14px; font-size: .98rem; opacity: .95; max-width: 560px; }

/* 返回按钮 */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 34px 5vw 0;
  max-width: 900px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink-soft);
  transition: gap .2s, color .2s;
}
.back-btn:hover { gap: 14px; color: var(--ink); }

/* 统计条 */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  max-width: 900px;
  margin: -38px auto 0;
  position: relative;
  z-index: 5;
  padding: 0 5vw;
}
.stat-box {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 10px;
  text-align: center;
  box-shadow: var(--card-shadow);
}
.stat-box .num { font-size: 1.7rem; font-weight: 800; color: var(--mc); }
.stat-box .label { font-size: .8rem; color: var(--ink-soft); margin-top: 2px; letter-spacing: 1px; }

/* 时间线 */
.timeline-wrap { max-width: 900px; margin: 0 auto; padding: 50px 5vw 70px; }

.timeline { position: relative; margin-top: 34px; padding-left: 30px; }

.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--mc), color-mix(in srgb, var(--mc) 35%, var(--line)));
}

.tl-item { position: relative; margin-bottom: 30px; }

.tl-item::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 8px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--mc);
  border: 4px solid var(--bg-soft);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--mc) 45%, transparent);
}

.tl-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px 24px;
  box-shadow: var(--card-shadow);
  transition: transform .25s, box-shadow .25s;
}
.tl-card:hover { transform: translateY(-3px); box-shadow: var(--card-shadow-hover); }

.tl-card .tl-date {
  font-family: ui-monospace, Consolas, monospace;
  font-size: .8rem;
  color: var(--mc);
  font-weight: 700;
  letter-spacing: 1px;
}
.tl-card .tl-title { font-size: 1.08rem; font-weight: 800; margin-top: 4px; }
.tl-card .tl-content { font-size: .94rem; color: var(--ink-soft); margin-top: 8px; white-space: pre-line; }
.tl-card .tl-tag {
  display: inline-block;
  margin-top: 10px;
  font-size: .74rem;
  color: var(--mc);
  background: color-mix(in srgb, var(--mc) 10%, white);
  border: 1px solid color-mix(in srgb, var(--mc) 30%, white);
  border-radius: 999px;
  padding: 2px 12px;
}

/* 空状态 */
.empty {
  text-align: center;
  color: var(--ink-soft);
  padding: 60px 20px;
  font-size: .98rem;
}
.empty .big { font-size: 3rem; margin-bottom: 10px; }

/* 如何添加记录说明 */
.howto {
  max-width: 900px;
  margin: 0 auto 70px;
  padding: 26px 30px;
  background: #fdf6e9;
  border: 1px dashed #d9b878;
  border-radius: 18px;
  font-size: .9rem;
  color: #7a623c;
}
.howto b { color: #4a3a20; }
.howto code {
  background: #f3e6cb;
  border-radius: 6px;
  padding: 1px 8px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: .85em;
  color: #8a5a20;
}

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
  /* 手机导航：品牌+用户区一行，链接第二行可横向滑动（防横向溢出→整页缩小） */
  .nav { flex-wrap: wrap; padding: 10px 4vw; gap: 8px 12px; }
  .nav .links { order: 3; width: 100%; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; gap: 18px; font-size: .88rem; padding-bottom: 4px; }
  .nav .links::-webkit-scrollbar { display: none; }
  .nav .links a { flex: none; }
  .nav .brand { font-size: 1.05rem; }
  .nav .domain-tag { display: none; }
  .hero { padding: 48px 5vw 56px; }
  .member-hero .inner { justify-content: center; text-align: center; }
  .feed-item { padding: 16px 18px; }
  .timeline { padding-left: 24px; }
  .tl-item::before { left: -24px; }
  /* 手机端隐藏右下角＋按钮和顶部Hero大按钮（导航栏内已有常驻"✏️ 写日志"按钮） */
  .fab-add { display: none; }
  .hero-add-btn { display: none; }
  /* 成员卡片手机端紧凑尺寸，与页面原内容一致 */
  .member-drawer .member-card,
  .members-inline .member-card { padding: 16px 14px 16px; }
  .member-drawer .member-card .card-avatar,
  .member-drawer .member-card .emoji-avatar,
  .members-inline .member-card .card-avatar,
  .members-inline .member-card .emoji-avatar { width: 56px; height: 56px; font-size: 1.7rem; margin: 2px auto 8px; }
  .member-drawer .member-card h3,
  .members-inline .member-card h3 { font-size: 1rem; }
  .member-drawer .member-card .bio,
  .members-inline .member-card .bio { font-size: .78rem; margin: 6px 0 8px; }
  .member-drawer .member-group,
  .members-inline .member-group { margin-bottom: 18px; }
  .member-drawer .member-group-title,
  .members-inline .member-group-title { font-size: .95rem; margin-bottom: 10px; }
}

/* 淡入动画 */
.fade-in { animation: fadeIn .7s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ============================================================
   登录状态 / 用户区
   ============================================================ */
.nav-right { display: flex; align-items: center; gap: 14px; }

.user-area { display: flex; align-items: center; gap: 10px; }

.user-chip {
  font-size: .85rem;
  font-weight: 600;
  color: #4a3a20;
  background: #fdf3df;
  border: 1px solid #f0dcb2;
  padding: 4px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

.btn-ghost {
  font-size: .88rem;
  font-weight: 700;
  color: #8a6a34;
  background: rgba(255,255,255,.6);
  border: 1px solid #d9b878;
  border-radius: 999px;
  padding: 5px 18px;
  cursor: pointer;
  transition: background .2s, color .2s;
  font-family: inherit;
}
.btn-ghost:hover { background: #fdf3df; color: #4a3a20; }

/* ============================================================
   登录页
   ============================================================ */
.login-body { min-height: 100vh; display: flex; flex-direction: column; }

.login-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px 5vw;
  background:
    radial-gradient(circle at 15% 20%, rgba(217,164,65,.12), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(232,185,138,.18), transparent 40%),
    var(--bg);
}

.login-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--card-shadow-hover);
  padding: 44px 42px 36px;
  width: 100%;
  max-width: 440px;
  text-align: center;
}

.login-emoji { font-size: 2.8rem; margin-bottom: 8px; }
.login-card h1 { font-size: 1.7rem; font-weight: 800; }
.login-sub { color: var(--ink-soft); font-size: .92rem; margin: 6px 0 26px; }

.login-hint {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px dashed var(--line);
  font-size: .85rem;
  color: var(--ink-soft);
  text-align: left;
}
.login-hint b { color: var(--ink); }
.login-hint table { width: 100%; margin-top: 10px; border-collapse: collapse; }
.login-hint td { padding: 6px 4px; border-bottom: 1px dashed var(--line); }
.login-hint td:first-child { color: var(--ink); }
.login-hint td:last-child { text-align: right; }
.login-hint code {
  background: #f3e6cb;
  border-radius: 6px;
  padding: 2px 10px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: .88em;
  color: #8a5a20;
}

/* ============================================================
   添加记录表单（紧凑布局）
   ============================================================ */
.add-entry {
  max-width: 720px;
  margin: 0 auto;
  background: var(--bg-soft);
  border: 2px dashed color-mix(in srgb, var(--mc, var(--gold)) 45%, var(--line));
  border-radius: 24px;
  padding: 34px 38px 30px;
  box-shadow: var(--card-shadow);
}

.add-login-tip {
  text-align: center;
  font-size: 1rem;
  color: var(--ink-soft);
  padding: 8px 0;
}
.add-login-tip a { color: var(--gold); font-weight: 700; text-decoration: underline; }

.add-form { text-align: left; }

/* 标题大输入框（主信息） */
.add-title-row { margin-bottom: 12px; }
.add-title-input {
  width: 100%;
  font-family: inherit;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 14px 18px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.add-title-input::placeholder { font-weight: 400; color: #c9c2b8; }
.add-title-input:focus {
  border-color: var(--mc, var(--gold));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--mc, var(--gold)) 18%, transparent);
}

/* 内容大输入框（主信息） */
.add-content-row { margin-bottom: 12px; }
.add-content-input {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 14px 18px;
  outline: none;
  resize: vertical;
  min-height: 120px;
  transition: border-color .2s, box-shadow .2s;
}
.add-content-input:focus {
  border-color: var(--mc, var(--gold));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--mc, var(--gold)) 18%, transparent);
}

/* 快捷操作：录音/录视频（内容框下面） */
.quick-record-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: -4px 0 12px;
}
.quick-record-btn {
  font-size: .88rem;
  padding: 7px 20px;
  border-radius: 999px;
  background: #fff;
}
.quick-record-btn:hover { transform: translateY(-1px); }
.record-tip { font-size: .8rem; color: var(--ink-soft); }

/* 录制完成后的删除/重录按钮行 */
.record-done-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.record-done-row .tl-btn { font-size: .78rem; padding: 4px 12px; }

/* 评论语音完成区（预览 + 删除/重录） */
.comment-voice-done {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.comment-voice-done .tl-btn { font-size: .78rem; padding: 4px 10px; }

/* 紧凑工具栏：成员/日期/标签/附件 一行 */
.add-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.toolbar-select, .toolbar-date {
  font-family: inherit;
  font-size: .82rem;
  color: var(--ink-soft);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  outline: none;
  max-width: 170px;
  cursor: pointer;
  transition: border-color .2s;
}
.toolbar-select:focus, .toolbar-date:focus { border-color: var(--mc, var(--gold)); }

.toolbar-btn {
  font-family: inherit;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  transition: all .2s;
}
.toolbar-btn:hover { border-color: var(--mc, var(--gold)); color: var(--ink); }
.toolbar-btn.active {
  background: var(--mc, var(--gold));
  border-color: var(--mc, var(--gold));
  color: #fff;
}

/* 展开面板（标签/附件/健康） */
.add-panel {
  background: color-mix(in srgb, var(--mc, var(--gold)) 4%, white);
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 10px 0 4px;
  animation: fadeIn .25s ease both;
}

/* ============================================================
   健康记录快速模板
   ============================================================ */
.health-tpl-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.health-tab {
  font-family: inherit;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  transition: all .2s;
}
.health-tab:hover { border-color: var(--mc, var(--gold)); color: var(--ink); }
.health-tab.active {
  background: var(--mc, var(--gold));
  border-color: var(--mc, var(--gold));
  color: #fff;
}

.health-tpl-tip {
  font-size: .8rem;
  color: var(--ink-soft);
  margin-bottom: 12px;
}
.health-tpl-tip b { color: var(--mc, var(--ink)); }

.health-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 480px) {
  .health-grid { grid-template-columns: 1fr; }
}

.form-row { margin-bottom: 16px; }
.form-row label {
  display: block;
  font-size: .85rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
  letter-spacing: .5px;
}
.form-row .hint { font-weight: 400; color: #b0a795; font-size: .8rem; }

.form-row input[type="text"],
.form-row input[type="password"],
.form-row input[type="date"],
.form-row select,
.form-row textarea {
  width: 100%;
  font-family: inherit;
  font-size: .95rem;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  border-color: var(--mc, var(--gold));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--mc, var(--gold)) 18%, transparent);
}
.form-row textarea { resize: vertical; min-height: 96px; }

.form-actions { display: flex; align-items: center; gap: 14px; margin-top: 22px; flex-wrap: wrap; }

.btn-primary {
  font-family: inherit;
  font-size: .98rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
  background: linear-gradient(135deg, var(--mc, var(--gold)), color-mix(in srgb, var(--mc, var(--gold)) 70%, #6b4a1f));
  border: none;
  border-radius: 12px;
  padding: 12px 30px;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--mc, var(--gold)) 30%, transparent);
}
.btn-primary:hover { transform: translateY(-2px); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.form-msg { font-size: .88rem; font-weight: 600; }

/* ============================================================
   记录中的添加者信息
   ============================================================ */
.feed-item .f-meta {
  margin-top: 6px;
  font-size: .78rem;
  color: #b0a795;
}

.tl-card .tl-meta {
  margin-top: 10px;
  font-size: .8rem;
  color: #b0a795;
}
.tl-card .tl-meta b { color: var(--ink-soft); }

/* ============================================================
   头像
   ============================================================ */
.member-card .avatar,
.card-avatar { width: 92px; height: 92px; }

.member-card img.card-avatar {
  margin: 8px auto 16px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  box-shadow: 0 8px 20px rgba(93, 70, 40, 0.18);
  border: 3px solid #fff;
}

.member-card .emoji-avatar {
  margin: 8px auto 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 2.6rem;
  background: linear-gradient(145deg, var(--mc), color-mix(in srgb, var(--mc) 55%, white));
  box-shadow: 0 8px 20px color-mix(in srgb, var(--mc) 30%, transparent);
}

.member-hero .big-avatar {
  overflow: hidden;
}
.member-hero .big-avatar-img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 28px;
}
.member-hero .big-avatar.emoji-avatar {
  font-size: 3.6rem;
}

/* ============================================================
   附件展示
   ============================================================ */
.att-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.att-item { border-radius: 12px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); }

.att-item a { display: block; }

.att-item .att-name {
  display: block;
  font-size: .78rem;
  color: var(--ink-soft);
  padding: 6px 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}
.att-item a:hover .att-name { color: var(--mc); }

.att-image img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
  transition: transform .25s;
}
.att-image a:hover img { transform: scale(1.05); }

.att-media video, .att-media audio { width: 100%; display: block; }
.att-media video { max-height: 260px; background: #000; }

.att-doc a { display: flex; align-items: center; gap: 8px; padding: 12px; }
.att-doc .att-doc-icon { font-size: 1.6rem; }
.att-doc .att-name { padding: 0; text-align: left; }

.f-att { font-size: .78rem; color: #b0a795; margin-top: 4px; }

/* ============================================================
   文件选择区
   ============================================================ */
.file-zone {
  border: 2px dashed color-mix(in srgb, var(--mc, var(--gold)) 45%, var(--line));
  border-radius: 12px;
  padding: 14px 18px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  background: #fff;
}
.file-zone:hover { border-color: var(--mc, var(--gold)); background: color-mix(in srgb, var(--mc, var(--gold)) 4%, white); }
.file-zone input[type="file"] { display: none; }
.file-zone-hint { font-size: .85rem; color: var(--ink-soft); }

/* ============================================================
   弹窗 (Modal)
   ============================================================ */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(45, 35, 20, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal {
  background: var(--bg-soft);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(0,0,0,.25);
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  animation: fadeIn .25s ease both;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 26px 14px;
  border-bottom: 1px solid var(--line);
}
.modal-head h3 { font-size: 1.15rem; font-weight: 800; }

.modal-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background .2s, color .2s;
}
.modal-close:hover { background: var(--bg); color: var(--ink); }

.modal-body { padding: 22px 26px 28px; }

/* 迁移中心：导出/导入分类选择面板 */
.exp-options { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 4px; }
.exp-opt {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--bg); border: 1px solid var(--line, rgba(128,128,128,.25));
  border-radius: 12px; padding: 11px 13px; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.exp-opt:hover { border-color: var(--accent, #4a90d9); }
.exp-opt input[type="checkbox"] { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--accent, #4a90d9); flex: none; }
.exp-opt-title { font-weight: 600; font-size: .95rem; }
.exp-size {
  font-weight: 600;
  font-size: .75rem;
  color: #b8860b;
  background: rgba(232, 176, 75, .14);
  border-radius: 8px;
  padding: 1px 7px;
  margin-left: 6px;
  vertical-align: 1px;
  white-space: nowrap;
}
.exp-opt .hint { display: block; margin-top: 2px; font-size: .8rem; line-height: 1.5; }
.import-inspect {
  background: var(--bg); border: 1px dashed var(--line, rgba(128,128,128,.35));
  border-radius: 12px; padding: 12px 14px; font-size: .9rem;
}
.import-inspect-title { font-weight: 700; margin-bottom: 8px; word-break: break-all; }
.import-inspect-item { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 4px 0; line-height: 1.5; }
.import-inspect-item.warn { color: #a8741d; }
.tag-ok, .tag-off {
  display: inline-flex; align-items: center; padding: 1px 9px; border-radius: 20px;
  font-size: .8rem; font-weight: 600; white-space: nowrap;
}
.tag-ok { background: rgba(46,204,113,.14); color: #1e8e4e; border: 1px solid rgba(46,204,113,.4); }
.tag-off { background: rgba(128,128,128,.1); color: #888; border: 1px solid rgba(128,128,128,.3); }
.att-missing { display: flex; align-items: center; gap: 8px; color: #a8741d; font-size: .85rem; padding: 6px 0; }

.avatar-edit-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.avatar-edit-preview {
  width: 84px; height: 84px;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--mc, var(--gold)), color-mix(in srgb, var(--mc, var(--gold)) 55%, white));
  display: grid;
  place-items: center;
  font-size: 2.4rem;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(93, 70, 40, 0.18);
}
.avatar-edit-preview img { width: 100%; height: 100%; object-fit: cover; }

.avatar-edit-actions .hint { font-size: .78rem; color: #b0a795; margin-bottom: 8px; display: block; }
.avatar-edit-actions .form-msg { font-size: .78rem; margin-top: 6px; display: block; }

/* ============================================================
   摄像头拍照
   ============================================================ */
.camera-modal { max-width: 440px; }

.camera-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.camera-controls .btn-primary { padding: 10px 26px; }

.backup-modal { max-width: 520px; }
.backup-auto-row { display: flex; align-items: center; gap: 14px; }
.backup-auto-label { display: flex; align-items: center; gap: 6px; font-weight: 700; cursor: pointer; }
.backup-list-title { font-weight: 700; font-size: .9rem; margin: 14px 0 8px; color: var(--ink); }
.backup-list { display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow-y: auto; }
.backup-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
}
.backup-icon { font-size: 1.1rem; }
/* 导入结果 */
.import-result {
  max-width: 720px;
  margin: 14px auto 0;
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: .92rem;
  line-height: 1.7;
}
.import-result.ok { background: rgba(46, 204, 113, .1); border: 1px solid rgba(46, 204, 113, .4); color: #1e8e4e; }
.import-result.err { background: rgba(192, 57, 43, .08); border: 1px solid rgba(192, 57, 43, .35); color: #c0392b; }
.import-stat { display: flex; gap: 10px 18px; flex-wrap: wrap; margin-top: 6px; }
.import-stat .warn { color: #a8741d; }
.import-stat b { font-size: 1.05em; }
.backup-info { flex: 1; min-width: 0; }
.backup-name {
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink);
  word-break: break-all;
}
.backup-meta { font-size: .75rem; color: var(--ink-soft); }
/* 里程碑备份：标记后金色高亮，永不被循环覆盖 */
.backup-item.milestone { border-color: #e8b04b; background: #fffdf2; }
.backup-item.milestone .backup-icon { color: #b8860b; }
.backup-item.milestone .backup-name { color: #8a6d1d; }
.ms-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 8px;
  background: rgba(232, 176, 75, .2);
  color: #8a6d1d;
  font-size: .66rem;
  font-weight: 700;
  vertical-align: 1px;
}
.backup-item .backup-check:disabled,
.backup-item .backup-del:disabled { opacity: .35; cursor: not-allowed; }

/* ============================================================
   成员页：照片放映播放器（时间顺序 / 随机 / 自己选）
   ============================================================ */
.stat-click { cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
.stat-click:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, .1); }
.stat-play { border-color: #e8b04b !important; background: linear-gradient(135deg, #fffdf2, #fdf3d9) !important; }
.stat-play .num { color: #b8860b; }

.slideshow {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(10, 10, 14, .97);
  display: flex; flex-direction: column;
  color: #fff;
}
.ss-head {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  flex-wrap: wrap;
}
.ss-title { font-weight: 700; font-size: 1rem; }
.ss-modes { display: flex; gap: 8px; flex-wrap: wrap; }
.ss-mode {
  border: 1px solid rgba(255, 255, 255, .28);
  background: transparent; color: #ddd;
  border-radius: 16px; padding: 4px 12px;
  font-size: .8rem; cursor: pointer;
}
.ss-mode.active { background: rgba(232, 176, 75, .22); border-color: #e8b04b; color: #ffd98a; font-weight: 700; }
.ss-close { margin-left: auto; }
.ss-stage {
  flex: 1; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  gap: 6px; padding: 8px 10px; position: relative;
}
.ss-canvas {
  flex: 1; min-width: 0; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative;
}
.ss-canvas img {
  max-width: 100%; max-height: 100%;
  object-fit: contain; border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, .55);
}
.ss-caption {
  position: absolute; left: 0; right: 0; bottom: 8px;
  text-align: center; font-size: .85rem; color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, .72));
  padding: 22px 12px 8px;
  pointer-events: none; text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
}
.ss-nav {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .08);
  color: #fff; font-size: 1.6rem; line-height: 1;
  cursor: pointer; flex: none;
}
.ss-nav:hover { background: rgba(255, 255, 255, .2); }
.ss-controls {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  padding: 10px 16px;
  border-top: 1px solid rgba(255, 255, 255, .12);
}
.ss-controls .tl-btn { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .3); }
.ss-counter { font-size: .85rem; color: #ccc; min-width: 70px; text-align: center; }
.ss-speed { font-size: .8rem; color: #ccc; display: inline-flex; align-items: center; gap: 4px; }
.ss-speed select {
  background: rgba(255, 255, 255, .12); color: #fff;
  border: 1px solid rgba(255, 255, 255, .3); border-radius: 8px;
  padding: 3px 6px; font-size: .78rem;
}
.ss-speed select option { color: #222; }
.ss-thumbs {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 10px 14px 14px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  scrollbar-width: thin;
}
.ss-thumb {
  position: relative; flex: none;
  width: 72px; height: 72px; border-radius: 8px;
  overflow: hidden; padding: 0; border: 2px solid transparent;
  cursor: pointer; background: #1c1c22;
}
.ss-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ss-thumb.bad img { opacity: .18; }
.ss-thumb.bad::after { content: "❓"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.ss-thumb.active { border-color: #e8b04b; box-shadow: 0 0 0 2px rgba(232, 176, 75, .35); }
.ss-thumb-date {
  position: absolute; left: 0; right: 0; bottom: 0;
  font-size: .58rem; color: #fff; text-align: center;
  background: rgba(0, 0, 0, .55); padding: 1px 0;
}

/* 足迹地点列表 */
.places-list { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow-y: auto; }
.place-item {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 12px; background: #fff;
}
.place-pin { font-size: 1.1rem; }
.place-name { flex: 1; font-weight: 600; font-size: .9rem; word-break: break-all; }
.place-count { font-size: .78rem; color: var(--ink-soft); background: rgba(74, 144, 217, .1); padding: 2px 8px; border-radius: 10px; }

/* ============================================================
   首页浮动「＋」快捷添加动态
   ============================================================ */
.fab-add {
  position: fixed;
  right: 26px;
  bottom: 26px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--gold) 0%, #e8b04b 100%);
  color: #fff;
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 8px 24px rgba(217, 164, 65, .45);
  cursor: pointer;
  z-index: 900;
  transition: transform .2s, box-shadow .2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab-add:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 12px 30px rgba(217, 164, 65, .55);
}
.fab-add:active { transform: scale(.95); }

/* 顶部「写日志」按钮（手机主页显眼入口，页面流内元素不依赖 fixed 定位） */
.hero-add-btn {
  display: inline-block;
  margin-top: 20px;
  padding: 13px 34px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold) 0%, #e8b04b 100%);
  color: #fff;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(217, 164, 65, .45);
  transition: transform .2s, box-shadow .2s;
  -webkit-tap-highlight-color: transparent;
}
.hero-add-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(217, 164, 65, .6);
}
.hero-add-btn:active { transform: scale(.96); }
.hero-add-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* 导航栏内「每日一录」按钮（写日志旁，描边风格区分主按钮） */
.nav-daily-btn {
  padding: 6px 14px;
  border: 1.5px solid var(--gold);
  border-radius: 999px;
  background: #fffdf6;
  color: var(--gold-deep, #8a6a34);
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s, transform .15s;
}
.nav-daily-btn:hover { background: #fdf3df; }
.nav-daily-btn:active { transform: scale(.95); }

/* 每日一录归档页 */
.daily-list { max-width: 860px; margin: 0 auto; padding: 8px 20px 60px; }
.daily-group {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-top: 18px;
  padding: 16px;
  box-shadow: 0 4px 14px rgba(120, 90, 40, .06);
}
.daily-group-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.daily-group-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex: none;
}
.daily-group-name { font-size: 1.05rem; font-weight: 700; color: var(--ink); }
.daily-group-count { font-size: .78rem; color: var(--ink-soft); }
.daily-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.daily-item {
  background: #fdfaf3;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.daily-item img.daily-img {
  width: 100%; height: 150px; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--line); display: block;
}
.daily-item audio.daily-audio { width: 100%; }
.daily-item video.daily-video { width: 100%; max-height: 180px; border-radius: 8px; background: #000; }
.daily-item-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .78rem; color: var(--ink-soft); }
.daily-item-meta .daily-del { margin-left: auto; padding: 3px 10px; }
@media (max-width: 640px) {
  .daily-items { grid-template-columns: 1fr; }
  .daily-item img.daily-img { height: 200px; }
  .nav-daily-btn { padding: 5px 10px; font-size: .8rem; }
}

/* 每日一录：当日头像预览 */
.daily-avatar-box {
  display: flex; align-items: center; gap: 12px;
  background: #fdfaf3; border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 12px; margin: 2px 0 10px;
}
.daily-avatar-preview { position: relative; width: 64px; height: 64px; flex: none; }
.daily-avatar-preview img {
  width: 64px; height: 64px; object-fit: cover;
  border-radius: 50%; border: 2px solid var(--gold); display: block;
}
.daily-avatar-preview .photo-preview-del {
  position: absolute; top: -6px; right: -6px;
  width: 20px; height: 20px; line-height: 20px;
  border-radius: 50%; background: #c0392b; color: #fff;
  border: none; cursor: pointer; font-size: .7rem; padding: 0;
}
.daily-avatar-hint { font-size: .85rem; color: var(--ink-soft); }
/* 归档页当日头像 */
.daily-avatar-items { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.daily-avatar-item { align-items: center; text-align: center; }
.daily-avatar-img {
  width: 84px; height: 84px; object-fit: cover;
  border-radius: 50%; border: 2px solid var(--gold); display: block; margin: 0 auto 6px;
}

/* 导航栏内「写日志」按钮（随吸顶导航常驻，下翻也可见） */
.nav-add-btn {
  padding: 7px 16px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold) 0%, #e8b04b 100%);
  color: #fff;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(217, 164, 65, .4);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: transform .15s;
}
.nav-add-btn:active { transform: scale(.95); }

/* 导航栏「管理」下拉菜单 */
.admin-menu-wrap { position: relative; }
.admin-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 168px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(45, 35, 20, .2);
  padding: 8px;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.admin-menu button,
.admin-menu a {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: none;
  color: var(--ink);
  font-size: .9rem;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.admin-menu button:hover,
.admin-menu a:hover { background: rgba(217, 164, 65, .14); }

/* 地点面板（添加/编辑/首页） */
.loc-search-row { display: flex; gap: 8px; }
.loc-search-row input { flex: 1; }
.loc-name-row { display: flex; gap: 8px; margin-top: 8px; align-items: center; }
.loc-name-row input { flex: 1; }
.loc-actions { margin-top: 8px; }

/* 时间线卡片位置 */
.tl-loc {
  font-size: .8rem;
  color: var(--mc, var(--gold));
  font-weight: 600;
  margin: 4px 0 6px;
}

/* 时间轴页面 */
.tl-page { max-width: 860px; margin: 0 auto; padding-bottom: 80px; }
@media (min-width: 1024px) { .tl-page { max-width: 1320px; } }
.tl-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: 0 auto 26px;
  padding: 0 20px;
}
.tl-toolbar .feed-search-input { flex: 1; min-width: 180px; }
.tl-list { padding: 0; }
.tl-month { margin-bottom: 30px; }
.tl-month-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 14px;
  padding-left: 10px;
  border-left: 4px solid var(--gold);
}
.tl-month-list { display: flex; flex-direction: column; gap: 10px; }
.tl-row {
  display: flex;
  gap: 12px;
  background: var(--bg-soft);
  border: 1.5px solid var(--line);
  border-left: 4px solid var(--mc, var(--gold));
  border-radius: 14px;
  padding: 12px 16px;
  text-decoration: none;
  transition: box-shadow .2s;
}
.tl-row:hover { box-shadow: var(--card-shadow); }
.tr-avatar {
  width: 42px;
  height: 42px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  background: #fff;
  border-radius: 50%;
  border: 2px solid var(--mc, var(--gold));
  overflow: hidden;
}
.tr-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
/* ============================================================
   家庭日历（时间轴旁/上）
   ============================================================ */
/* 双栏布局容器：手机端上下堆叠（日历在前=上方），PC 端并排 */
.tl-layout {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 70px;
}
.cal-side { order: 1; }
.tl-main { order: 2; flex: 1; min-width: 0; }
/* 主页侧边栏日历（PC 端稍窄） */
.home-layout { max-width: 1280px; padding: 0 20px 10px; }
/* PC 端：日历靠最右、内容限宽不挤压、中间留白 */
@media (min-width: 1024px) {
  .tl-layout {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
    max-width: 1280px;
  }
  .cal-side {
    order: 2;
    width: 380px;
    flex: 0 0 380px;
    position: sticky;
    top: 20px;
  }
  .tl-main {
    order: 1;
    flex: 0 1 820px;
    max-width: 820px;
  }
  .home-cal-side { width: 340px; flex-basis: 340px; }
  .cal-section { padding: 0; }
}
.cal-section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 4px 14px rgba(120, 90, 40, .05);
}
.cal-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.cal-nav {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  font-size: .9rem;
  cursor: pointer;
  transition: all .15s;
}
.cal-nav:hover { border-color: var(--gold); background: #fdf3df; }
.cal-title { font-size: 1.15rem; font-weight: 800; min-width: 130px; text-align: center; }
.cal-today {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--gold);
  background: #fdf3df;
  color: #8a6a34;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.cal-jump {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cal-jump-sel {
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  font-size: .82rem;
  font-weight: 700;
  font-family: inherit;
  color: var(--ink);
  cursor: pointer;
}
.cal-jump-sel:focus { border-color: var(--gold); outline: none; }
.cal-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 6px;
}
.cal-week span {
  text-align: center;
  font-size: .78rem;
  font-weight: 700;
  color: var(--ink-soft);
  padding: 4px 0;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.cal-cell {
  min-height: 78px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px 6px 8px;
  display: flex;
  flex-direction: column;
  cursor: default;
  transition: all .15s;
  position: relative;
}
.cal-cell.has { cursor: pointer; background: #fff; }
.cal-cell.has:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(120, 90, 40, .12); }
.cal-cell.today { border-color: var(--gold); background: #fdf3df; }
.cal-cell.cal-empty { background: transparent; border-color: transparent; }
.cal-day {
  font-size: .8rem;
  font-weight: 700;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.cal-cell.today .cal-day { color: #a8741d; }
.cal-today-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--gold);
  display: inline-block;
}
.cal-faces {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex-wrap: wrap;
  margin-top: 5px;
}
.cal-face-img {
  width: 30px; height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
  flex: none;
}
.cal-face-emoji { font-size: 1.05rem; }
.cal-more {
  font-size: .66rem;
  font-weight: 800;
  color: var(--gold);
  background: #fdf3df;
  border-radius: 999px;
  padding: 1px 5px;
}
.cal-day-list {
  margin-top: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 4px 14px rgba(120, 90, 40, .06);
}
.cal-day-title { font-weight: 800; margin-bottom: 10px; font-size: .95rem; }
.cal-day-item {
  display: flex;
  gap: 12px;
  padding: 10px 6px;
  border-bottom: 1px dashed var(--line);
  text-decoration: none;
  color: inherit;
}
.cal-day-item:last-child { border-bottom: none; }
.cal-day-ava {
  width: 40px; height: 40px;
  border-radius: 50%;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  background: var(--bg-soft);
  overflow: hidden;
  border: 2px solid var(--mc, var(--gold));
}
.cal-day-ava img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.cal-day-body { flex: 1; min-width: 0; }
.cal-day-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .8rem; }
.cal-day-name { font-weight: 800; color: var(--mc, var(--gold)); }
.cal-day-tag { font-size: .7rem; color: var(--ink-soft); background: var(--bg); padding: 1px 8px; border-radius: 999px; }
.cal-day-title2 { font-weight: 700; margin-top: 2px; }
.cal-day-content {
  font-size: .82rem;
  color: var(--ink-soft);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
@media (max-width: 640px) {
  .cal-cell { min-height: 64px; padding: 4px 3px 6px; }
  .cal-face-img { width: 24px; height: 24px; }
  .cal-faces { gap: 2px; }
  .cal-grid { gap: 4px; }
  .cal-week { gap: 4px; }
}
.tr-body { flex: 1; min-width: 0; }
.tr-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .8rem; margin-bottom: 4px; }
.tr-name { font-weight: 800; color: var(--mc, var(--gold)); }
.tr-date { color: var(--ink-soft); }
.tr-loc { color: var(--gold); font-weight: 600; }
.tr-title { font-weight: 700; color: var(--ink); font-size: .95rem; margin-bottom: 2px; }
.tr-content {
  font-size: .85rem;
  color: var(--ink-soft);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.tr-tag { display: inline-block; margin-top: 6px; font-size: .72rem; color: var(--gold); background: #fdf6e8; border-radius: 999px; padding: 2px 10px; }

/* ============================================================
   管理后台（admin）
   ============================================================ */
.admin-hero {
  background: linear-gradient(135deg, #2d2d3a 0%, #3a3a4d 60%, #4a3f35 100%);
  color: #fff;
  text-align: center;
  padding: 60px 20px 50px;
}
.admin-hero h1 { font-size: 2rem; margin-bottom: 10px; }
.admin-hero p { color: rgba(255,255,255,.75); font-size: .95rem; }

.admin-main { max-width: 900px; margin: 0 auto; padding: 30px 20px 80px; }

.admin-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.stat-card {
  flex: 1;
  min-width: 120px;
  background: var(--bg-soft);
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 18px 12px;
  text-align: center;
}
.stat-num { font-size: 1.8rem; font-weight: 800; color: var(--gold); }
.stat-label { font-size: .8rem; color: var(--ink-soft); margin-top: 4px; }
/* 主页显示内容配置表单 */
.site-config-form {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.site-config-form .form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}
.site-config-form .form-row label { font-weight: 700; font-size: .88rem; }
.site-config-form input[type="text"],
.site-config-form textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  font-size: .9rem;
  font-family: inherit;
}
.site-config-form textarea { resize: vertical; line-height: 1.6; }
.site-config-form .form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.admin-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.admin-toolbar .feed-search-input { flex: 1; min-width: 180px; }
.admin-add-btn { margin-left: auto; }

.admin-list { display: flex; flex-direction: column; gap: 12px; }
/* 通用分页条 */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 24px 0 10px;
}
.pager-btn {
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--ink);
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
}
.pager-btn:hover:not(:disabled) { border-color: var(--gold); background: #fdf3df; color: #8a6a34; }
.pager-btn:disabled { opacity: .4; cursor: not-allowed; }
.pager-info { font-size: .85rem; color: var(--ink-soft); font-weight: 700; }
.pager-jump { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--ink-soft); }
.pager-input {
  width: 64px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  font-size: .85rem;
  font-family: inherit;
  text-align: center;
}
.pager-go {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--gold);
  background: #fdf3df;
  color: #8a6a34;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.admin-item {
  display: flex;
  gap: 14px;
  background: var(--bg-soft);
  border: 1.5px solid var(--line);
  border-left: 5px solid var(--mc, var(--gold));
  border-radius: 16px;
  padding: 16px 18px;
  transition: box-shadow .2s;
}
.admin-item:hover { box-shadow: var(--card-shadow); }

.ai-avatar {
  width: 52px;
  height: 52px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: #fff;
  border-radius: 50%;
  border: 2px solid var(--mc, var(--gold));
}
.ai-body { flex: 1; min-width: 0; }
.ai-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: .82rem;
  margin-bottom: 6px;
}
.ai-name { font-weight: 800; color: var(--mc, var(--gold)); }
.ai-date, .ai-tag { color: var(--ink-soft); }
.ai-title { font-weight: 800; font-size: 1rem; color: var(--ink); margin-bottom: 4px; }
.ai-content {
  font-size: .88rem;
  color: var(--ink-soft);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 6px;
}
.ai-meta { font-size: .75rem; color: #b0a795; }
.ai-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: none;
}
.ai-actions .tl-btn { font-size: .8rem; padding: 4px 10px; }

/* ============================================================
   记录编辑 / 删除按钮
   ============================================================ */
.tl-card .tl-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.tl-btn {
  font-family: inherit;
  font-size: .8rem;
  font-weight: 600;
  color: var(--mc, var(--ink-soft));
  background: color-mix(in srgb, var(--mc, var(--gold)) 8%, white);
  border: 1px solid color-mix(in srgb, var(--mc, var(--gold)) 30%, var(--line));
  border-radius: 999px;
  padding: 5px 16px;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.tl-btn:hover { background: color-mix(in srgb, var(--mc, var(--gold)) 18%, white); transform: translateY(-1px); }
.tl-btn.danger { color: #c0392b; border-color: #e8b4b4; background: #fdf0f0; }
.tl-btn.danger:hover { background: #f9dcdc; }

.tl-card .tl-edited {
  display: block;
  margin-top: 4px;
  font-size: .78rem;
  color: #c9a45a;
}

/* ============================================================
   待上传文件列表 / 录音
   ============================================================ */
.pending-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pending-item, .edit-att-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: .85rem;
}

.pending-icon { font-size: 1.1rem; flex: none; }
.pending-name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
}
.pending-size { flex: none; font-size: .75rem; color: #b0a795; font-family: ui-monospace, Consolas, monospace; }

.pending-del {
  flex: none;
  background: none;
  border: none;
  color: var(--ink-soft);
  font-size: .9rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition: background .2s, color .2s;
}
.pending-del:hover { background: #fde8e8; color: #c0392b; }

.record-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.record-tip { font-size: .8rem; color: var(--ink-soft); }

.edit-att-list { display: flex; flex-direction: column; gap: 6px; }

/* ============================================================
   标签主题快捷选择
   ============================================================ */
.tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 2px;
}

.tag-chip {
  font-family: inherit;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 5px 16px;
  cursor: pointer;
  transition: all .2s;
}
.tag-chip:hover {
  border-color: var(--mc, var(--gold));
  color: var(--ink);
  transform: translateY(-1px);
}
.tag-chip.active {
  background: var(--mc, var(--gold));
  border-color: var(--mc, var(--gold));
  color: #fff;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--mc, var(--gold)) 30%, transparent);
}
/* 三大主题给不同强调色 */
.tag-chip[data-tag="学习"] { border-color: #3b82c4; color: #3b82c4; }
.tag-chip[data-tag="学习"].active { background: #3b82c4; color: #fff; }
.tag-chip[data-tag="健康"] { border-color: #2fa39a; color: #2fa39a; }
.tag-chip[data-tag="健康"].active { background: #2fa39a; color: #fff; }
.tag-chip[data-tag="生活"] { border-color: #e0658f; color: #e0658f; }
.tag-chip[data-tag="生活"].active { background: #e0658f; color: #fff; }

/* ============================================================
   点赞 / 评论
   ============================================================ */
.tl-card .tl-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  flex-wrap: wrap;
}

.tl-act-spacer { flex: 1; }

.like-btn { transition: transform .15s; }
.like-btn:active { transform: scale(.9); }
.like-btn.liked {
  color: #e0245e;
  border-color: #f5b3c5;
  background: #fdeef2;
}

.tl-comments {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.comment-empty {
  font-size: .85rem;
  color: #b0a795;
  padding: 6px 0 10px;
}

.comment-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}
.comment-item:last-of-type { border-bottom: none; }

.comment-avatar {
  flex: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--mc, var(--gold)), color-mix(in srgb, var(--mc, var(--gold)) 55%, white));
  display: grid;
  place-items: center;
  font-size: 1.05rem;
}

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

.comment-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.comment-author { font-size: .85rem; font-weight: 700; color: var(--ink); }
.comment-time { font-size: .75rem; color: #b0a795; }
.comment-del {
  background: none;
  border: none;
  cursor: pointer;
  font-size: .8rem;
  color: #b0a795;
  padding: 2px 4px;
  border-radius: 4px;
}
.comment-del:hover { color: #c0392b; background: #fde8e8; }

.comment-content {
  font-size: .92rem;
  color: var(--ink);
  margin-top: 3px;
  white-space: pre-line;
  word-break: break-word;
}

.comment-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.comment-input {
  flex: 1;
  font-family: inherit;
  font-size: .9rem;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  outline: none;
  transition: border-color .2s;
}
.comment-input:focus { border-color: var(--mc, var(--gold)); }

.comment-login-tip {
  font-size: .85rem;
  color: var(--ink-soft);
  padding: 8px 0;
}
.comment-login-tip a { color: var(--gold); font-weight: 700; text-decoration: underline; }

/* ============================================================
   评论语音
   ============================================================ */
.comment-voice {
  flex: none;
  font-size: 1rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  padding: 0;
  display: grid;
  place-items: center;
  background: #fff;
}
.comment-voice:hover { transform: none; }

.comment-voice-status {
  font-size: .78rem;
  color: var(--ink-soft);
  margin-top: 6px;
  min-height: 1.2em;
}

.comment-voice-preview { border-radius: 10px; }

.comment-audio {
  width: 100%;
  max-width: 340px;
  height: 34px;
  display: block;
  margin: 4px 0 6px;
  border-radius: 999px;
}

/* ============================================================
   站内消息
   ============================================================ */
.bell-btn {
  position: relative;
  padding: 5px 12px;
  font-size: 1.05rem;
}

.bell-badge, .msg-unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e0245e;
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}

.bell-badge {
  position: absolute;
  top: -5px;
  right: -6px;
  box-shadow: 0 2px 6px rgba(224, 36, 94, .4);
}

.msg-modal { max-width: 560px; }

/* ============================================================
   许愿墙
   ============================================================ */
.wish-form {
  max-width: 720px;
  margin: 10px auto 30px;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wish-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  font-size: .95rem;
  font-family: inherit;
  resize: vertical;
}
.wish-form-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.wish-form-row input[type="datetime-local"] {
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-family: inherit;
  font-size: .85rem;
  background: var(--bg-soft);
}
.wish-vis {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .88rem;
  color: var(--ink-soft);
  cursor: pointer;
}
.wish-vis input { accent-color: var(--gold); }
/* 许愿/目标类型切换 */
.wish-type-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.wish-type-tab {
  padding: 7px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--bg-soft);
  color: var(--ink-soft);
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
}
.wish-type-tab.active {
  background: linear-gradient(135deg, var(--gold) 0%, #e8b04b 100%);
  border-color: transparent;
  color: #fff;
}
.wish-type-tabs.small { margin-bottom: 10px; }
.wish-type-tabs.small .wish-type-tab { padding: 5px 14px; font-size: .82rem; }
/* 目标表单行 */
.wish-goal-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.wish-goal-label { font-size: .88rem; font-weight: 700; color: var(--ink); }
.wish-goal-row input[type="date"] {
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-family: inherit;
  font-size: .85rem;
  background: var(--bg-soft);
}
/* 目标卡片与完成状态 */
.wish-card.goal-card { border-left: 4px solid var(--gold); }
.w-badge.goal-todo { background: rgba(217, 164, 65, .18); color: #a8741d; }
.w-badge.goal-done { background: rgba(46, 204, 113, .18); color: #1e8e4e; }
.w-badge.goal-date { background: rgba(120, 120, 120, .1); color: #666; }
.wish-card .w-body.goal-body-done {
  color: var(--ink-soft);
  text-decoration: line-through;
  text-decoration-color: rgba(30, 142, 78, .5);
}
.wish-list {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px 80px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.wish-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--card-shadow);
}
.wish-card.locked { background: rgba(45, 35, 20, .03); }
.wish-card .w-body {
  font-size: 1rem;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}
.wish-card .w-body.locked-text { color: var(--ink-soft); }
.wish-card .w-admin-hint { color: var(--gold); font-size: .8rem; }
.wish-card .w-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: .8rem;
  color: var(--ink-soft);
}
.wish-card .w-badge {
  padding: 2px 9px;
  border-radius: 999px;
  font-size: .75rem;
  white-space: nowrap;
}
.w-badge.direct { background: rgba(46, 204, 113, .15); color: #1e8e4e; }
.w-badge.expire { background: rgba(217, 164, 65, .18); color: #a8741d; }
.w-badge.locked { background: rgba(120, 120, 120, .15); color: #666; }
.wish-card .w-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.wish-voice-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.wish-voice-done { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.wish-audio { width: 100%; margin-top: 10px; height: 40px; }
.wish-edit-cur { margin-bottom: 8px; font-size: .85rem; color: var(--ink-soft); }
.wish-edit-cur audio { width: 100%; margin-top: 4px; height: 40px; }

/* ============================================================
   迁移中心
   ============================================================ */
.mig-section {
  max-width: 760px;
  margin: 0 auto 26px;
  padding: 22px 24px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
}
.mig-section h3 { margin: 0 0 6px; font-size: 1.15rem; }
.mig-desc { margin: 0 0 14px; color: var(--ink-soft); font-size: .92rem; line-height: 1.7; }
.mig-desc b { color: var(--ink); }
.mig-tools { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.mig-tips {
  margin: 14px 0 0;
  padding-left: 4px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--ink-soft);
  font-size: .9rem;
  line-height: 1.7;
}
.mig-tips b { color: var(--ink); }
.pkg-list { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.pkg-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.pkg-name { font-size: .9rem; word-break: break-all; }
.pkg-meta { color: var(--ink-soft); font-size: .8rem; }
.pkg-dl { margin-left: auto; text-decoration: none; }
.mig-details { margin-top: 14px; }
.mig-details summary { cursor: pointer; color: var(--gold); font-weight: 600; }
.mig-details ol { margin: 10px 0 0; padding-left: 22px; line-height: 2; font-size: .9rem; }
.mig-details code {
  background: rgba(45, 35, 20, .06);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: .85em;
  word-break: break-all;
}
/* 备份调度控件 + 进度状态卡 */
.backup-sched-controls { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.backup-sched-controls select,
.backup-sched-controls input[type="time"] {
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  font-family: inherit;
  font-size: .9rem;
}
.backup-status {
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(217, 164, 65, .08);
  border: 1px dashed rgba(217, 164, 65, .4);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: .88rem;
  line-height: 1.7;
}
.backup-status-item b { color: var(--ink); }
/* 存储占用状态卡（迁移中心页）：硬盘容量 + 网站文件占用 */
.storage-status { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.storage-card {
  padding: 12px 14px;
  background: rgba(52, 152, 219, .07);
  border: 1px dashed rgba(52, 152, 219, .35);
  border-radius: 10px;
}
.storage-card-title { font-size: .88rem; font-weight: 700; margin-bottom: 8px; color: var(--ink); }
.storage-bar {
  height: 10px; border-radius: 6px; overflow: hidden;
  background: rgba(52, 152, 219, .15);
  border: 1px solid rgba(52, 152, 219, .25);
}
.storage-bar-fill {
  height: 100%; border-radius: 6px;
  background: linear-gradient(90deg, #3498db, #2ecc71);
  transition: width .4s ease;
}
.storage-bar-labels {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px;
  margin-top: 7px; font-size: .82rem; color: var(--ink-soft);
}
.storage-bar-labels b { color: var(--ink); }
.storage-bar-labels .storage-free { color: #1e8449; }
.storage-rows { display: flex; flex-direction: column; gap: 5px; font-size: .85rem; }
.storage-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  color: var(--ink-soft);
}
.storage-row b { color: var(--ink); font-weight: 600; white-space: nowrap; }
.storage-row-total {
  border-top: 1px dashed rgba(52, 152, 219, .3);
  padding-top: 6px; margin-top: 2px; font-weight: 700;
}
.storage-row-total span, .storage-row-total b { color: var(--ink); font-weight: 700; }
/* 备份列表工具栏 + 多选/下载 */
.backup-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0 8px;
  font-size: .85rem;
}
.backup-checkall {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: var(--ink-soft);
}
.backup-checkall input { accent-color: var(--gold); }
.backup-toolbar-spacer { flex: 1; }
.backup-item .backup-check { width: 16px; height: 16px; accent-color: var(--gold); flex: none; }
.backup-dl { text-decoration: none; }
/* 多路径编辑器 */
.path-editor { display: flex; flex-direction: column; gap: 8px; margin: 6px 0; }
.path-row { display: flex; gap: 8px; align-items: center; }
.path-row .path-input {
  flex: 1;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  font-size: .9rem;
  font-family: inherit;
}
.path-row .path-del { flex: none; }
.agent-paths .path-editor { max-width: 640px; }
.pkg-row .pkg-check { width: 16px; height: 16px; accent-color: var(--gold); flex: none; }

/* 写日志弹窗：照片预览 */
.photo-preview { margin-top: 10px; }
.photo-preview-title { font-size: .8rem; color: var(--ink-soft); margin-bottom: 6px; }
.photo-preview-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.photo-preview-item { position: relative; width: 84px; height: 84px; }
.photo-preview-item img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.video-preview-list { display: flex; flex-direction: column; gap: 10px; }
.video-preview-item { position: relative; border: 1px solid var(--line); border-radius: 12px; padding: 8px; background: #000; }
.video-preview-item video { width: 100%; max-height: 260px; border-radius: 8px; display: block; background: #000; }
.video-preview-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; gap: 8px; }
.video-preview-name { font-size: .78rem; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.video-preview-size { font-size: .75rem; color: var(--ink-soft); flex: none; }
.photo-preview-del {
  position: absolute;
  top: -7px; right: -7px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #c0392b;
  color: #fff;
  border: none;
  font-size: .75rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}

/* 后台：家人资料管理 */
.admin-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 18px;
  box-shadow: var(--card-shadow);
}
.admin-card-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.admin-card-head h3 { margin: 0; font-size: 1.02rem; }
.admin-members { display: flex; flex-direction: column; gap: 8px; }
.admin-member-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.admin-member-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex: none;
}
.admin-member-info { flex: 1; min-width: 0; }
.admin-member-name { font-weight: 600; font-size: .95rem; }
.admin-member-meta { font-size: .78rem; color: var(--ink-soft); margin-top: 2px; }
.admin-profile-member { font-weight: 700; }

/* ============================================================
   手机端日志左滑：点赞 / 评论操作条
   ============================================================ */
.tl-swipe { position: relative; overflow: hidden; border-radius: var(--radius); }
.tl-swipe-actions {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 100px;
  display: none;
  flex-direction: column;
  z-index: 1;
}
.tl-swipe-actions .swipe-act {
  flex: 1;
  border: none;
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
  background: #e67e22;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0;
  cursor: pointer;
}
.tl-swipe-actions .swipe-act.swipe-comment { background: #2e86de; }
.tl-swipe-body {
  position: relative;
  z-index: 2;
  background: var(--bg-soft);
  border-radius: var(--radius);
}
.feed-swipe .feed-comments {
  position: relative;
  z-index: 3;               /* 盖住右滑操作条，输入框不被遮 */
  padding: 10px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
}
.feed-swipe .feed-comments .comment-form { margin-top: 8px; }
.f-stats {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  font-size: .78rem;
  color: var(--ink-soft);
  align-items: center;
}
/* 快速点赞/评论图标按钮（PC 端动态卡上直接操作） */
.f-quick-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink-soft);
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
  -webkit-tap-highlight-color: transparent;
}
.f-quick-btn:hover { border-color: var(--gold); background: #fdf3df; color: #8a6a34; }
.f-quick-btn:active { transform: scale(.93); }
.f-quick-btn.liked { border-color: #e8b04b; background: #fdf3df; color: #c0392b; }
/* 桌面端操作条完全不显示 */
@media (min-width: 641px) {
  .tl-swipe-actions { display: none !important; }
}

/* ============================================================
   荣誉榜
   ============================================================ */
.ach-form {
  max-width: 720px;
  margin: 10px auto 30px;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ach-form-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ach-title-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  font-size: .95rem;
  font-family: inherit;
  box-sizing: border-box;
}
.ach-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  font-size: .95rem;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
}
.ach-form input[type="date"] {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-family: inherit;
  font-size: .9rem;
  background: var(--bg-soft);
}
.ach-list {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px 80px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ach-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--card-shadow);
}
.ach-medal {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex: none;
}
.ach-main { flex: 1; min-width: 0; }
.ach-title { font-size: 1.05rem; font-weight: 600; }
.ach-desc {
  margin-top: 6px;
  font-size: .92rem;
  line-height: 1.7;
  color: var(--ink-soft);
  white-space: pre-wrap;
  word-break: break-word;
}
.ach-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-size: .8rem;
  color: var(--ink-soft);
}
.ach-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* 手机端：操作按钮换行到文字下方整行，避免挤压正文成细条 */
@media (max-width: 640px) {
  .ach-card { flex-wrap: wrap; }
  .ach-actions { width: 100%; justify-content: flex-start; }
  .ach-medal { width: 44px; height: 44px; font-size: 1.3rem; }
}

/* 手机端：导航两行布局（第1行 logo|写日志|名字，第2行 消息|管理|退出）+ 用户区紧凑 */
@media (max-width: 640px) {
  .nav-right .domain-tag { display: none; }
  .nav-right { flex-direction: column; align-items: stretch; gap: 8px; width: 100%; order: 2; font-size: .85rem; }
  .nav-row { display: flex; align-items: center; gap: 10px; }
  .nav-row1 { justify-content: flex-start; }
  .nav .brand { font-size: .95rem; }
  .nav .brand .logo { width: 28px; height: 28px; font-size: .9rem; }
  .nav .brand > span:not(.logo) { display: none; }
  .nav-right button, .nav-right .user-chip, .nav-add-btn {
    height: 32px;
    line-height: 32px;
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
  }
  .nav .user-area { gap: 6px; }
}

/* ============================================================
   消息中心侧边抽屉
   ============================================================ */
.msg-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(400px, 92vw);
  background: var(--bg-soft);
  z-index: 1001;
  box-shadow: -12px 0 40px rgba(45, 35, 20, .18);
  transform: translateX(105%);
  transition: transform .3s ease;
  display: flex;
  flex-direction: column;
}
.msg-drawer.open { transform: translateX(0); }

.msg-drawer-mask {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(45, 35, 20, .4);
}

.msg-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.msg-drawer-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.msg-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px;
}

.msg-drawer .msg-list { max-height: none; }

/* 家庭成员抽屉 / 内联成员列表 */
.member-drawer { width: min(560px, 96vw); }
.member-drawer .member-group,
.members-inline .member-group { margin-bottom: 26px; }
.member-drawer .member-group-title,
.members-inline .member-group-title { font-size: 1.05rem; margin-bottom: 14px; }
.member-drawer .members { grid-template-columns: 1fr 1fr; gap: 14px; }
/* 内联成员列表（查看全部成员）一行只显示一个成员 */
.members-inline .members { grid-template-columns: 1fr; gap: 14px; }
.member-drawer .member-card,
.members-inline .member-card { padding: 22px 16px 20px; }
.member-drawer .member-card .card-avatar,
.member-drawer .member-card .emoji-avatar,
.members-inline .member-card .card-avatar,
.members-inline .member-card .emoji-avatar { width: 72px; height: 72px; font-size: 2.1rem; margin: 4px auto 10px; }
.member-drawer .member-card h3,
.members-inline .member-card h3 { font-size: 1.15rem; }
.member-drawer .member-card .bio,
.members-inline .member-card .bio { font-size: .82rem; min-height: 0; margin: 8px 0 10px; }
.members-inline { padding: 4px 0 6px; }
@media (max-width: 480px) {
  .member-drawer .members,
  .members-inline .members { grid-template-columns: 1fr; }
}

.msg-send-box {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.msg-send-box select {
  flex: none;
  font-family: inherit;
  font-size: .85rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
  max-width: 160px;
}
.msg-content-input {
  flex: 1;
  min-width: 160px;
  font-family: inherit;
  font-size: .9rem;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  outline: none;
  background: #fff;
  color: var(--ink);
}
.msg-content-input:focus { border-color: var(--mc, var(--gold)); }

.msg-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
}

.msg-box .msg-list { max-height: 480px; }

.msg-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px;
  transition: background .2s;
}
.msg-item.unread {
  background: #fdf3df;
  border-color: #f0dcb2;
}

.msg-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.msg-arrow { font-size: .95rem; }
.msg-from { font-size: .88rem; font-weight: 700; color: var(--ink); }
.msg-time { font-size: .75rem; color: #b0a795; margin-left: auto; }
.msg-unread-tag {
  font-size: .7rem;
  font-weight: 700;
  color: #fff;
  background: #e0245e;
  border-radius: 999px;
  padding: 2px 10px;
}

.msg-content {
  font-size: .92rem;
  color: var(--ink);
  margin-top: 6px;
  white-space: pre-line;
  word-break: break-word;
}
.msg-content.recalled {
  color: #b0a795;
  font-style: italic;
}
.msg-recalled-tag {
  font-size: .7rem;
  font-weight: 700;
  color: #8a8a8a;
  background: #f0f0f0;
  border-radius: 999px;
  padding: 2px 10px;
}
.msg-edited-tag {
  font-size: .72rem;
  font-weight: 600;
  color: #c9a45a;
}

.msg-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.msg-reply-box {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.msg-reply-input {
  flex: 1;
  font-family: inherit;
  font-size: .88rem;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  outline: none;
  background: #fff;
  color: var(--ink);
}
.msg-reply-input:focus { border-color: var(--mc, var(--gold)); }

.msg-edit-box {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.msg-edit-input {
  flex: 1;
  font-family: inherit;
  font-size: .88rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 7px 14px;
  outline: none;
  background: #fff;
  color: var(--ink);
}
.msg-edit-input:focus { border-color: var(--mc, var(--gold)); }
