/* ============================================================
   我们的日常 · 情侣空间 v3
   设计语言参考 OurLove 模板：
   暖米白背景 + 青绿/暖黄双主色 + 大圆角卡片 + 噜噜/噜妹吉祥物
   底部悬浮 4 Tab（首页 / 互动 / 记忆 / 计划）
   ============================================================ */

:root {
  /* 主色 */
  --teal: #2fb9b1;
  --teal-deep: #1aa398;
  --teal-soft: #e3f6f3;
  --amber: #f2bd4a;
  --amber-deep: #dda22f;
  --amber-soft: #fdf3da;

  /* 背景 / 卡片 */
  --bg: #faf6ee;
  --bg-2: #f4efe3;
  --card: #ffffff;
  --card-2: #fffdf9;

  /* 文字 */
  --ink: #3a3833;
  --ink-soft: #6d6a63;
  --muted: #a3a096;
  --line: rgba(90, 74, 40, 0.09);
  --fill: rgba(90, 74, 40, 0.05);

  --heart-grad: linear-gradient(150deg, #45d0c5 0%, #7ad4ae 45%, #f4c24f 100%);
  --teal-grad: linear-gradient(135deg, #4bd2c8, #24b0a6);
  --amber-grad: linear-gradient(135deg, #f8cd67, #eaa931);

  --shadow-sm: 0 4px 14px rgba(150, 120, 60, 0.07);
  --shadow-md: 0 10px 26px rgba(150, 120, 60, 0.12);
  --shadow-lg: 0 18px 44px rgba(120, 96, 40, 0.16);

  --r-lg: 26px;
  --r-md: 20px;
  --r-sm: 14px;

  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --tabbar-h: 68px;

  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

html, body {
  margin: 0; padding: 0; height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC",
    "Helvetica Neue", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-y: none;
  -webkit-text-size-adjust: 100%;
}

/* 暖色柔光背景 */
body::before {
  content: "";
  position: fixed; inset: -20%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(38% 30% at 12% 4%, rgba(90, 214, 202, 0.22), transparent 70%),
    radial-gradient(40% 32% at 90% 2%, rgba(246, 197, 90, 0.22), transparent 70%),
    radial-gradient(50% 38% at 50% 104%, rgba(146, 226, 200, 0.16), transparent 72%);
}

/* ---------- App 外框（桌面居中模拟手机） ---------- */
.app {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  width: 100%; max-width: 460px;
  height: 100vh; height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  overflow: hidden;
  box-shadow: 0 0 70px rgba(150, 120, 60, 0.12);
}
@media (min-width: 520px) {
  body { background: var(--bg-2); }
  .app {
    height: min(100dvh - 34px, 950px);
    margin-top: 17px;
    border-radius: 34px;
    border: 1px solid rgba(255, 255, 255, 0.7);
  }
}

/* ---------- 顶栏 ---------- */
.topbar {
  flex: 0 0 auto; position: relative; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding: calc(var(--safe-t) + 14px) 18px 10px;
  background: linear-gradient(180deg, var(--bg) 70%, rgba(250, 246, 238, 0));
}
.topbar .brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.topbar .brand .dot {
  width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto;
  background: var(--heart-grad); box-shadow: 0 4px 10px rgba(70, 200, 190, 0.35);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px;
}
.topbar .brand .t { font-size: 19px; font-weight: 800; letter-spacing: -0.4px; }
.topbar .brand .s { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.icon-btn {
  border: none; flex: 0 0 auto;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.85); color: var(--ink-soft);
  box-shadow: var(--shadow-sm); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.16s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.icon-btn:active { transform: scale(0.9); }
.icon-btn svg { width: 20px; height: 20px; }

/* ---------- 内容区 ---------- */
.content {
  flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 4px 16px calc(var(--tabbar-h) + var(--safe-b) + 26px);
}
@keyframes floatIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.panel { animation: floatIn 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }

.card {
  background: var(--card); border-radius: var(--r-md);
  box-shadow: var(--shadow-sm); padding: 16px; margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.9);
}
.card-title {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 16px; font-weight: 800; letter-spacing: -0.2px; margin: 0 0 12px;
}
.card-title .more { font-size: 12.5px; color: var(--muted); font-weight: 600; }

/* ============ 首页 ============ */
.hero {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg);
  padding: 20px 14px 18px;
  margin-bottom: 14px;
  border: 2px solid transparent;
  background:
    linear-gradient(var(--card-2), var(--card-2)) padding-box,
    linear-gradient(135deg, #a7e8df, #f7dd9a) border-box;
  box-shadow: var(--shadow-md);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(30% 45% at 6% 0%, rgba(90, 214, 202, 0.13), transparent 70%),
    radial-gradient(30% 45% at 96% 100%, rgba(246, 197, 90, 0.14), transparent 70%);
}
.hero .spark { position: absolute; font-size: 13px; opacity: 0.55; pointer-events: none; }

.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; position: relative; z-index: 1; }
.hero-side { flex: 0 0 auto; width: 96px; display: flex; flex-direction: column; align-items: center; gap: 7px; }
.hero-side .mas {
  width: 84px; height: 84px; border-radius: 50%; object-fit: cover;
  border: 3px solid #fff; box-shadow: var(--shadow-md); background: var(--fill);
}
.hero-side.a .mas { box-shadow: 0 8px 20px rgba(234, 169, 49, 0.35); }
.hero-side.b .mas { box-shadow: 0 8px 20px rgba(36, 176, 166, 0.32); }
.hero-side .meter {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 700; color: #fff;
  padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}
.hero-side.a .meter { background: var(--amber-grad); box-shadow: 0 4px 10px rgba(234, 169, 49, 0.35); }
.hero-side.b .meter { background: var(--teal-grad); box-shadow: 0 4px 10px rgba(36, 176, 166, 0.32); }
.hero-side .nm { font-size: 14px; font-weight: 800; }

.hero-mid { flex: 1 1 auto; position: relative; display: flex; flex-direction: column; align-items: center; }
.heart-wrap { position: relative; width: 150px; height: 138px; }
.heart-wrap svg { width: 100%; height: 100%; filter: drop-shadow(0 10px 20px rgba(70, 200, 190, 0.28)); }
.heart-txt {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; color: #fff; padding-top: 6px;
}
.heart-txt .top { font-size: 12px; font-weight: 600; opacity: 0.96; letter-spacing: 0.3px; }
.heart-txt .num { font-size: 46px; font-weight: 900; line-height: 1; letter-spacing: -2px; text-shadow: 0 2px 6px rgba(60, 140, 130, 0.25); }
.heart-txt .unit { font-size: 12px; font-weight: 700; letter-spacing: 2.5px; margin-top: 2px; opacity: 0.95; }

.dist-pill {
  margin-top: -6px; position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 7px;
  background: #fff; border-radius: 999px; padding: 8px 18px;
  font-size: 17px; font-weight: 800; color: var(--ink); white-space: nowrap;
  box-shadow: var(--shadow-md); border: 1px solid var(--line);
}
.dist-pill small { font-size: 12px; color: var(--muted); font-weight: 600; }
.dist-dashes {
  position: absolute; top: 44%; left: -6px; right: -6px; height: 2px; z-index: 0;
  background: repeating-linear-gradient(90deg, rgba(47, 185, 177, 0.4) 0 6px, transparent 6px 12px);
}
.heart-wrap { position: relative; z-index: 1; }

/* 天气行 */
.wx-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.wx {
  border-radius: var(--r-md); padding: 14px; background: var(--card);
  box-shadow: var(--shadow-sm); border: 1.5px solid transparent; position: relative;
  background: linear-gradient(var(--card), var(--card)) padding-box,
              linear-gradient(135deg, #c9ecf5, #d8f0e6) border-box;
}
.wx.b { background: linear-gradient(var(--card), var(--card)) padding-box,
                linear-gradient(135deg, #f7e6b8, #f0d79a) border-box; }
.wx .top { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.wx .top .city { display: inline-flex; align-items: center; gap: 3px; color: var(--ink-soft); font-weight: 700; }
.wx .main { display: flex; align-items: center; gap: 9px; margin: 9px 0 4px; }
.wx .temp { font-size: 30px; font-weight: 800; letter-spacing: -1px; line-height: 1; }
.wx .emi { font-size: 26px; line-height: 1; margin-left: auto; }
.wx .desc { font-size: 12px; color: var(--ink-soft); }
.wx .lr { font-size: 11px; color: var(--muted); margin-top: 3px; }

/* 提醒条 */
.remind {
  display: flex; align-items: center; gap: 13px;
  border-radius: var(--r-md); padding: 14px 16px; margin-bottom: 14px;
  background: linear-gradient(135deg, #fdf6e4, #fbf1f6);
  border: 1.5px solid #f6e6c4;
  box-shadow: var(--shadow-sm);
}
.remind .icoe { font-size: 30px; }
.remind .tx { flex: 1 1 auto; }
.remind .tx .k { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.remind .tx .v { font-size: 16px; font-weight: 800; margin-top: 2px; }
.remind .tx .d { font-size: 11.5px; color: var(--ink-soft); margin-top: 2px; }
.remind .arrow { color: var(--muted); font-size: 18px; }

/* 快捷动作 */
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.action {
  border-radius: var(--r-md); padding: 20px 12px 16px; text-align: center;
  background: var(--card); cursor: pointer; border: 1.5px solid transparent;
  background: linear-gradient(var(--card), var(--card)) padding-box,
              linear-gradient(135deg, #bfeae2, #d9f0ea) border-box;
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.action.warm { background: linear-gradient(var(--card), var(--card)) padding-box,
                        linear-gradient(135deg, #f8e2ac, #f3d68f) border-box; }
.action:active { transform: scale(0.96); }
.action .e { font-size: 40px; line-height: 1; }
.action .t { font-size: 15px; font-weight: 800; margin-top: 10px; }
.action .s { font-size: 11.5px; color: var(--muted); margin-top: 3px; }

/* ============ 互动 ============ */
.mood-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mood-col {
  border-radius: var(--r-md); padding: 14px; text-align: center;
  background: var(--card); box-shadow: var(--shadow-sm);
  border: 1.5px solid transparent;
}
.mood-col.a { background: linear-gradient(var(--card), var(--card)) padding-box, var(--amber-grad) border-box; }
.mood-col.b { background: linear-gradient(var(--card), var(--card)) padding-box, var(--teal-grad) border-box; }
.mood-col .who { display: flex; align-items: center; justify-content: center; gap: 7px; font-weight: 800; font-size: 14px; }
.mood-col .who img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.mood-col .cur { font-size: 40px; margin: 8px 0 2px; line-height: 1; min-height: 44px; }
.mood-col .pick { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin-top: 8px; }
.mood-col .pick span {
  font-size: 20px; padding: 3px; border-radius: 9px; cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}
.mood-col .pick span:active { transform: scale(0.85); }
.mood-col .pick span.on { background: var(--fill); }

.poke-card { text-align: center; padding: 22px 16px; }
.poke-heart {
  width: 96px; height: 96px; margin: 0 auto 12px; border-radius: 50%;
  background: var(--heart-grad); color: #fff; font-size: 44px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 0 14px 30px rgba(70, 200, 190, 0.4); border: none;
  transition: transform 0.15s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.poke-heart:active { transform: scale(0.9); }
@keyframes beat { 0%,100% { transform: scale(1); } 45% { transform: scale(1.12); } }
.poke-heart.beat { animation: beat 0.5s ease; }
.poke-card .cnt { font-size: 15px; font-weight: 800; }
.poke-card .cnt b { color: var(--teal-deep); font-size: 20px; }
.poke-card .sub { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.poke-recent { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 14px; }
.poke-chip {
  font-size: 11.5px; color: var(--teal-deep); font-weight: 600;
  background: var(--teal-soft); padding: 4px 10px; border-radius: 999px;
}

/* ============ 记忆 ============ */
.mem-head { display: flex; align-items: center; justify-content: space-between; margin: 2px 2px 12px; }
.month-pick {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font-size: 21px; font-weight: 800; letter-spacing: -0.5px;
  background: none; border: none; font-family: inherit; color: var(--ink); padding: 0;
}
.month-pick:active { opacity: 0.6; }
.add-round {
  width: 46px; height: 46px; border-radius: 50%; border: none; flex: 0 0 auto;
  background: var(--teal-grad); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(36, 176, 166, 0.4);
  transition: transform 0.16s;
}
.add-round:active { transform: scale(0.9); }
.add-round svg { width: 22px; height: 22px; }

.segmented {
  display: flex; gap: 4px; padding: 4px; border-radius: 999px;
  background: var(--fill); margin-bottom: 16px;
}
.segmented button {
  flex: 1; border: none; background: none; font-family: inherit; cursor: pointer;
  font-size: 13.5px; font-weight: 700; color: var(--muted);
  padding: 9px 0; border-radius: 999px; transition: all 0.2s;
}
.segmented button.on { background: #fff; color: var(--teal-deep); box-shadow: var(--shadow-sm); }

.day-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 800; margin: 16px 0 12px 2px;
}
.day-label small { font-size: 11.5px; color: var(--muted); font-weight: 600; }

.timeline { position: relative; padding-left: 52px; }
.timeline::before {
  content: ""; position: absolute; left: 20px; top: 8px; bottom: 10px; width: 2px;
  background: linear-gradient(180deg, rgba(47, 185, 177, 0.4), rgba(242, 189, 74, 0.32), rgba(47, 185, 177, 0.05));
  border-radius: 2px;
}
.tl-item { position: relative; margin-bottom: 16px; }
.tl-avatar {
  position: absolute; left: -52px; top: -2px;
  width: 42px; height: 42px; border-radius: 50%; object-fit: cover;
  border: 2.5px solid #fff; background: var(--fill);
  box-shadow: var(--shadow-sm);
}
.tl-avatar.a { box-shadow: 0 5px 14px rgba(234, 169, 49, 0.35); }
.tl-avatar.b { box-shadow: 0 5px 14px rgba(36, 176, 166, 0.32); }
.tl-card {
  background: var(--card); border-radius: var(--r-md); padding: 13px 15px 15px;
  box-shadow: var(--shadow-sm); cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.9);
  transition: transform 0.16s;
}
.tl-card:active { transform: scale(0.985); }
.tl-top { display: flex; align-items: center; gap: 8px; }
.tl-time { font-size: 15px; font-weight: 800; color: var(--ink); }
.tl-loc { font-size: 12.5px; color: var(--teal-deep); font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }
.tl-mood { margin-left: auto; font-size: 18px; }
.tl-text { font-size: 14.5px; color: var(--ink-soft); line-height: 1.6; margin-top: 7px; word-break: break-word; white-space: pre-wrap; }
.tl-photos { display: grid; gap: 6px; margin-top: 10px; grid-template-columns: repeat(2, 1fr); }
.tl-photos.one { grid-template-columns: 1fr; max-width: 74%; }
.tl-photos img, .tl-photos video {
  width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 14px;
  background: var(--fill); display: block; cursor: pointer;
}
.tl-photos.one img, .tl-photos.one video { aspect-ratio: 4/3; }
.vid-badge { position: relative; }
.vid-badge::after {
  content: "▶"; position: absolute; right: 8px; bottom: 8px;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.5); color: #fff; font-size: 11px;
  display: flex; align-items: center; justify-content: center;
}

/* 相册 */
.albums { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.album {
  background: var(--card); border-radius: var(--r-md); overflow: hidden;
  box-shadow: var(--shadow-sm); cursor: pointer; border: 1px solid rgba(255,255,255,0.9);
}
.album .mosaic { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 2px; aspect-ratio: 1/1; background: var(--fill); }
.album .mosaic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.album .mosaic .cell { background: linear-gradient(135deg, #e6f6f2, #f8efd6); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.album .mosaic.n1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.album .meta { padding: 10px 12px 12px; }
.album .meta .nm { font-size: 14.5px; font-weight: 800; }
.album .meta .ct { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* ============ 计划 ============ */
.cal { padding: 16px 14px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-head .m { font-size: 17px; font-weight: 800; }
.cal-head button {
  width: 32px; height: 32px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--fill); color: var(--ink-soft); font-size: 15px;
  display: flex; align-items: center; justify-content: center;
}
.cal-head button:active { transform: scale(0.9); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-grid .wk { font-size: 11px; color: var(--muted); text-align: center; padding: 4px 0; font-weight: 700; }
.cal-cell {
  aspect-ratio: 1/1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  font-size: 14px; font-weight: 600; border-radius: 50%; cursor: pointer;
  position: relative; color: var(--ink);
}
.cal-cell.dim { color: var(--muted); opacity: 0.5; }
.cal-cell.today { background: var(--teal-grad); color: #fff; box-shadow: 0 6px 14px rgba(36,176,166,0.4); }
.cal-cell.sel:not(.today) { background: var(--fill); }
.cal-cell .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--amber); position: absolute; bottom: 4px; }
.cal-cell.today .dot { background: #fff; }

.diary-card .dt { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.diary-card .dt .d { font-size: 16px; font-weight: 800; }
.diary-card .dt .w { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.diary-card .body {
  border-left: 3px solid var(--amber); background: var(--amber-soft);
  border-radius: 0 12px 12px 0; padding: 12px 14px; font-size: 13.5px;
  color: var(--ink-soft); line-height: 1.65;
}
.diary-card .body.empty { border-left-color: var(--line); background: var(--fill); color: var(--muted); }
.diary-link { border: none; background: none; color: var(--teal-deep); font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; }

.plans { display: flex; flex-direction: column; gap: 10px; }
.plan-item {
  display: flex; align-items: center; gap: 14px; border-radius: var(--r-md);
  background: var(--card); padding: 14px 16px; box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--teal);
}
.plan-item .num { font-size: 19px; font-weight: 900; color: var(--teal-deep); white-space: nowrap; letter-spacing: -0.5px; }
.plan-item .num small { font-size: 11px; font-weight: 700; }
.plan-item .info { flex: 1 1 auto; min-width: 0; }
.plan-item .info .t { font-size: 15px; font-weight: 700; }
.plan-item .info .d { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.plan-item .del { border: none; background: var(--fill); color: var(--muted); width: 28px; height: 28px; border-radius: 50%; cursor: pointer; flex: 0 0 auto; }

/* ============ 底部悬浮 Tab ============ */
.tabbar {
  position: absolute; left: 14px; right: 14px; z-index: 25;
  bottom: calc(9px + var(--safe-b));
  height: 62px; border-radius: 22px;
  display: flex; align-items: center; justify-content: space-around;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  box-shadow: 0 12px 30px rgba(140, 110, 50, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.8);
}
.tab {
  flex: 1; border: none; background: none; cursor: pointer; font-family: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--muted); font-size: 10.5px; font-weight: 700; padding: 0;
}
.tab svg { width: 23px; height: 23px; transition: transform 0.2s; }
.tab .av { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; display: none; border: 2px solid #fff; }
.tab.active { color: var(--teal-deep); }
.tab.active svg { display: none; }
.tab.active .av { display: block; animation: pop 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.4); }
@keyframes pop { from { transform: scale(0.5); } to { transform: scale(1); } }

/* ============ Sheet ============ */
.sheet-mask {
  position: absolute; inset: 0; z-index: 40;
  background: rgba(60, 50, 30, 0.4);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.sheet-mask.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 41;
  display: flex; flex-direction: column; max-height: 92%;
  background: var(--card); border-radius: 28px 28px 0 0;
  box-shadow: 0 -12px 44px rgba(120, 96, 40, 0.22);
  padding-bottom: calc(14px + var(--safe-b));
  transform: translateY(101%);
  transition: transform 0.4s cubic-bezier(0.22, 0.9, 0.24, 1);
}
.sheet.open { transform: translateY(0); }
.sheet-grip { width: 38px; height: 5px; border-radius: 3px; background: var(--line); margin: 10px auto 2px; flex: 0 0 auto; }
.sheet-head {
  flex: 0 0 auto; display: flex; justify-content: space-between; align-items: center;
  padding: 10px 18px 13px; border-bottom: 1px solid var(--line);
}
.sheet-head h2 { font-size: 18px; font-weight: 800; margin: 0; }
.sheet-head .x {
  border: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--fill); color: var(--ink-soft); font-size: 15px; cursor: pointer;
}
.sheet-body { padding: 16px 18px 4px; overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* 表单 */
.field { margin-bottom: 16px; }
.field > label { display: block; font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 7px; }
.field input[type="text"], .field input[type="date"], .field input[type="password"],
.field input[type="number"], .field textarea, .field select {
  width: 100%; border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 12px 14px; font-size: 16px; font-family: inherit; color: var(--ink);
  background: var(--card-2); outline: none; transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none; appearance: none;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--teal); box-shadow: 0 0 0 3px rgba(47, 185, 177, 0.15);
}
.field textarea { resize: vertical; min-height: 90px; line-height: 1.55; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.mood-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.mood-opt {
  width: 44px; height: 44px; border-radius: 14px; border: 1.5px solid var(--line);
  background: var(--card-2); font-size: 22px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}
.mood-opt:active { transform: scale(0.92); }
.mood-opt.sel { border-color: var(--teal); background: var(--teal-soft); transform: scale(1.06); }

.photo-pick {
  display: block; text-align: center; cursor: pointer;
  border: 1.5px dashed var(--teal); border-radius: var(--r-sm);
  padding: 18px; font-size: 14px; font-weight: 700; color: var(--teal-deep);
  background: rgba(47, 185, 177, 0.05);
}
.photo-pick input { display: none; }
.exist-photos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.exist-photos:empty { display: none; }
.exist-photos .ep { position: relative; }
.exist-photos img { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; display: block; }
.exist-photos .ep button {
  position: absolute; top: -6px; right: -6px; width: 22px; height: 22px;
  border-radius: 50%; border: none; background: #ef6b6b; color: #fff;
  font-size: 12px; cursor: pointer; line-height: 1; box-shadow: 0 2px 6px rgba(239,107,107,0.45);
}

.btn {
  width: 100%; border: none; border-radius: 15px; padding: 15px;
  font-size: 16px; font-weight: 800; font-family: inherit; cursor: pointer;
  min-height: 50px; transition: transform 0.15s, opacity 0.2s;
}
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--teal-grad); color: #fff; box-shadow: 0 10px 22px rgba(36, 176, 166, 0.35); }
.btn.warm { background: var(--amber-grad); color: #fff; box-shadow: 0 10px 22px rgba(234, 169, 49, 0.35); }
.btn.soft { background: var(--teal-soft); color: var(--teal-deep); }
.btn.danger { background: rgba(239, 107, 107, 0.13); color: #d8443f; }
.btn + .btn { margin-top: 12px; }

.avatar-pick { display: flex; gap: 10px; }
.avatar-pick label {
  flex: 1; border: 2px solid var(--line); border-radius: var(--r-sm); padding: 10px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer; font-size: 12px; font-weight: 700; color: var(--muted);
}
.avatar-pick label.on { border-color: var(--teal); background: var(--teal-soft); color: var(--teal-deep); }
.avatar-pick img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.avatar-pick input { display: none; }

/* 设置分组 */
.group { background: var(--card); border-radius: var(--r-md); overflow: hidden; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.group .row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; font-size: 15px; min-height: 52px; border-bottom: 1px solid var(--line);
}
.group .row:last-child { border-bottom: none; }
.group .row .val { color: var(--muted); font-size: 13.5px; }
.group .row button.link { border: none; background: none; color: #d8443f; font-size: 15px; font-weight: 700; font-family: inherit; cursor: pointer; }

/* ============ 空态 / 加载 ============ */
.empty { text-align: center; color: var(--muted); padding: 56px 20px; }
.empty .e { font-size: 44px; margin-bottom: 8px; }
.empty p { margin: 0; font-size: 14px; line-height: 1.7; }
.skeleton {
  height: 100px; border-radius: var(--r-md); margin-bottom: 14px;
  background: linear-gradient(100deg, var(--fill) 30%, rgba(255,255,255,0.6) 50%, var(--fill) 70%);
  background-size: 220% 100%; animation: shimmer 1.3s infinite linear;
}
@keyframes shimmer { from { background-position: 160% 0; } to { background-position: -60% 0; } }

/* ============ 灯箱 ============ */
.lightbox {
  position: absolute; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.92); opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img, .lightbox video { max-width: 94%; max-height: 88%; border-radius: 12px; }
.lightbox .x {
  position: absolute; top: calc(16px + var(--safe-t)); right: 18px;
  width: 38px; height: 38px; border: none; border-radius: 50%;
  background: rgba(255,255,255,0.16); color: #fff; font-size: 20px; cursor: pointer;
}

/* ============ 登录页 ============ */
.login-screen {
  position: absolute; inset: 0; z-index: 70;
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px;
  background: linear-gradient(170deg, var(--bg), var(--bg-2));
}
.login-screen::before {
  content: ""; position: absolute; inset: -20%; pointer-events: none;
  background:
    radial-gradient(38% 30% at 16% 8%, rgba(90, 214, 202, 0.24), transparent 70%),
    radial-gradient(40% 32% at 86% 4%, rgba(246, 197, 90, 0.24), transparent 70%),
    radial-gradient(48% 36% at 50% 102%, rgba(146, 226, 200, 0.18), transparent 72%);
}
.login-card { position: relative; text-align: center; width: 100%; max-width: 330px; }
.login-mascots { display: flex; justify-content: center; gap: -10px; margin-bottom: 6px; }
.login-mascots img {
  width: 84px; height: 84px; border-radius: 50%; object-fit: cover;
  border: 3px solid #fff; box-shadow: var(--shadow-md);
}
.login-mascots img:first-child { transform: rotate(-6deg) translateX(6px); }
.login-mascots img:last-child { transform: rotate(6deg) translateX(-6px); }
.login-card h1 { font-size: 27px; font-weight: 900; margin: 14px 0 4px; letter-spacing: -0.6px; }
.login-card .sub { color: var(--muted); font-size: 13.5px; margin: 0 0 26px; }
.login-card input {
  width: 100%; padding: 15px 16px; margin-bottom: 14px;
  border: 1px solid var(--line); border-radius: 16px; font-size: 16px;
  font-family: inherit; text-align: center; outline: none;
  background: var(--card); color: var(--ink);
}
.login-card input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(47, 185, 177, 0.16); }
.login-err { background: rgba(239, 107, 107, 0.13); color: #d8443f; border-radius: 12px; padding: 11px; margin-bottom: 14px; font-size: 13.5px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
