/* =========================================================
   nomi — 样式表
   移动优先，桌面端居中成一张「手机卡片」
   ========================================================= */

:root {
  --bg: #FFF7F4;
  --card: #FFFFFF;
  --ink: #3B2C2F;
  --ink2: #6B575B;
  --muted: #A99A9C;
  --pink: #FF6F91;
  --pink-d: #F2557C;
  --pink-l: #FFE6EC;
  --peach: #FFD9C7;
  --mint: #6FCFBB;
  --amber: #FFC46B;
  --lilac: #C3AEF0;
  --line: #F4E5E2;
  --shadow: 0 14px 34px -16px rgba(206, 122, 143, .55);
  --shadow-sm: 0 4px 14px -6px rgba(206, 122, 143, .35);
  --r: 22px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

h1, h2, h3, h4, p, figure { margin: 0; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
img { display: block; max-width: 100%; }
input, textarea, select { font: inherit; }
::selection { background: var(--pink-l); }

/* ---------- 骨架 ---------- */

#app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
}

.view {
  flex: 1;
  padding: 0 16px calc(132px + var(--safe-b));
  animation: fadeUp .32s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* 桌面端：居中手机卡片 */
@media (min-width: 600px) {
  body {
    background:
      radial-gradient(1100px 600px at 15% -10%, #FFE7EE 0%, transparent 60%),
      radial-gradient(900px 500px at 100% 0%, #EAF8F4 0%, transparent 55%),
      #FBF1EC;
  }
  #app {
    max-width: 520px;
    margin: 0 auto;
    background: var(--bg);
    box-shadow: 0 0 0 1px rgba(244, 229, 226, .9), 0 40px 90px -40px rgba(150, 90, 100, .45);
    min-height: 100dvh;
  }
}

/* ---------- 顶栏 ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: calc(var(--safe-t) + 10px) 18px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(to bottom, var(--bg) 62%, rgba(255, 247, 244, 0));
  backdrop-filter: blur(8px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  letter-spacing: .3px;
  font-size: 16px;
}
.brand .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--peach));
  box-shadow: 0 0 0 4px var(--pink-l);
}

.top-actions { display: flex; align-items: center; gap: 6px; }

.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 13px;
  color: var(--ink2);
  transition: background .18s, transform .18s;
}
.icon-btn:active { transform: scale(.92); background: #fff0ee; }

/* ---------- Fab ---------- */

.fab {
  position: fixed;
  right: 20px;
  bottom: calc(88px + var(--safe-b));
  width: 58px; height: 58px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: #fff;
  background: linear-gradient(140deg, var(--pink) 0%, #FF9A76 100%);
  box-shadow: 0 12px 26px -8px rgba(255, 111, 145, .8), 0 2px 0 rgba(255, 255, 255, .5) inset;
  transition: transform .22s cubic-bezier(.34, 1.56, .64, 1), box-shadow .22s;
  z-index: 40;
}
.fab:active { transform: scale(.9); }
.fab.open { transform: rotate(45deg); }
@media (min-width: 600px) { .fab { right: calc(50% - 260px + 20px); } }

/* ---------- 底部导航 ---------- */

.tabbar {
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  z-index: 35;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  padding: 8px 8px calc(8px + var(--safe-b));
  background: rgba(255, 252, 250, .88);
  backdrop-filter: saturate(180%) blur(16px);
  border-top: 1px solid rgba(244, 229, 226, .9);
}
@media (min-width: 600px) {
  .tabbar {
    left: 50%; right: auto;
    width: 520px;
    transform: translateX(-50%);
  }
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 0 2px;
  color: #B7A6A8;
  font-size: 10.5px;
  font-weight: 500;
  position: relative;
  transition: color .2s;
}
.tab svg { width: 22px; height: 22px; }
.tab.active { color: var(--pink-d); }
.tab.active::after {
  content: "";
  position: absolute;
  top: 0;
  width: 16px; height: 3px;
  border-radius: 3px;
  background: var(--pink);
  animation: pop .3s ease both;
}
@keyframes pop { from { transform: scaleX(.2); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  border-radius: 26px;
  padding: 18px;
  margin: 6px 0 14px;
  background: linear-gradient(140deg, #FFE4EB 0%, #FFEDE0 55%, #FFF6E9 100%);
  box-shadow: var(--shadow);
  overflow: hidden;
  isolation: isolate;
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  z-index: -1;
}
.hero::before { width: 150px; height: 150px; right: -40px; top: -60px; background: rgba(255, 255, 255, .55); }
.hero::after { width: 90px; height: 90px; right: 40px; bottom: -50px; background: rgba(255, 182, 193, .5); }

.hero-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.faces { display: flex; align-items: center; gap: 5px; }
.face {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  border: 3px solid #fff;
  box-shadow: 0 4px 10px -4px rgba(180, 120, 130, .6);
  background: linear-gradient(140deg, #FFA7B8, #FF7E95);
  overflow: hidden;
  flex: none;
}
.face.b { background: linear-gradient(140deg, #9EE0D3, #64C3AE); }
.face img { width: 100%; height: 100%; object-fit: cover; }
.face-heart {
  width: 20px; height: 20px;
  flex: none;
  color: var(--pink);
  z-index: 2;
  animation: beat 2.6s ease-in-out infinite;
}
@keyframes beat {
  0%, 100% { transform: scale(1); }
  12% { transform: scale(1.18); }
  24% { transform: scale(1); }
  36% { transform: scale(1.12); }
  48% { transform: scale(1); }
}

.hero-names { display: flex; flex-direction: column; gap: 2px; }
.hero-names b { font-size: 15px; font-weight: 600; }
.hero-names span { font-size: 12px; color: #96797E; }

.hero-count { display: flex; align-items: baseline; gap: 8px; }
.hero-num {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1;
  background: linear-gradient(120deg, #FF5C86, #FF9A5B);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}
.hero-unit { font-size: 14px; font-weight: 600; color: #8A6E73; }
.hero-sub { font-size: 12.5px; color: #97797E; margin-top: 6px; }
.hero-sub b { color: var(--pink-d); }

.hero-cta {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 12px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  color: var(--pink-d);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* ---------- 今日心情 ---------- */

.checkin {
  background: var(--card);
  border-radius: var(--r);
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #FBEEEC;
}
.checkin-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; color: var(--muted); margin-bottom: 10px;
}
.checkin-head b { color: var(--ink); font-size: 13.5px; }
.moods { display: flex; gap: 6px; justify-content: space-between; }
.mood-btn {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 2px 5px;
  border-radius: 14px;
  background: #FFF9F8;
  border: 1.5px solid transparent;
  transition: .18s;
}
.mood-btn .e { font-size: 21px; line-height: 1; filter: grayscale(.35); transition: .18s; }
.mood-btn .t { font-size: 9.5px; color: var(--muted); }
.mood-btn:active { transform: scale(.93); }
.mood-btn.on {
  background: var(--pink-l);
  border-color: #FFC2D1;
}
.mood-btn.on .e { filter: none; transform: scale(1.08); }
.mood-btn.on .t { color: var(--pink-d); font-weight: 600; }

/* ---------- 分段 / 筛选 ---------- */

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 12px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  padding: 7px 14px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink2);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid #F6E7E4;
  transition: .18s;
}
.chip.on {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* ---------- 时间线 ---------- */

.group-head {
  display: flex; align-items: center; gap: 10px;
  margin: 18px 2px 10px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: .4px;
}
.group-head::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.card {
  background: var(--card);
  border-radius: var(--r);
  padding: 15px 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #FCF0EE;
  transition: transform .18s;
  animation: fadeUp .3s ease both;
}
.card:active { transform: scale(.995); }

.card-meta {
  display: flex; align-items: center; gap: 7px;
  font-size: 11.5px; color: var(--muted);
  margin-bottom: 6px;
}
.who {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px 2px 3px;
  border-radius: 999px;
  background: var(--pink-l);
  color: var(--pink-d);
  font-weight: 600;
  font-size: 11px;
}
.who.b { background: #E3F6F1; color: #2F9C85; }
.who .mini {
  width: 16px; height: 16px; border-radius: 50%;
  display: grid; place-items: center; font-size: 9px; color: #fff;
  background: linear-gradient(140deg, #FFA7B8, #FF7E95);
  overflow: hidden;
}
.who.b .mini { background: linear-gradient(140deg, #9EE0D3, #64C3AE); }
.who .mini img { width: 100%; height: 100%; object-fit: cover; }

.card-title { font-size: 16.5px; font-weight: 650; margin-bottom: 4px; letter-spacing: -.2px; }
.card-text { font-size: 14.5px; color: var(--ink2); white-space: pre-wrap; word-break: break-word; }
.card-text.clamp { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }

.card-foot {
  display: flex; align-items: center; gap: 10px;
  margin-top: 10px;
  font-size: 12px; color: var(--muted);
}
.mood-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 999px;
  background: #FFF6E8; color: #B4813A; font-weight: 500;
}

/* 图片网格 */
.thumbs {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  grid-template-columns: repeat(3, 1fr);
}
.thumbs.n1 { grid-template-columns: 1fr; }
.thumbs.n2 { grid-template-columns: repeat(2, 1fr); }
.thumbs .ph {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: #F6EBE9;
}
.thumbs.n1 .ph { aspect-ratio: 4 / 3; }
.thumbs.n2 .ph { aspect-ratio: 1 / 1; }
.thumbs .ph img { width: 100%; height: 100%; object-fit: cover; }
.thumbs .more {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: rgba(60, 30, 35, .45);
  color: #fff; font-weight: 700; font-size: 15px;
  backdrop-filter: blur(2px);
}

/* 悄悄话（便签） */
.notes {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 0 14px;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}
.notes::-webkit-scrollbar { display: none; }
.note {
  flex: none;
  scroll-snap-align: start;
  width: 200px;
  padding: 13px 14px;
  border-radius: 16px 16px 16px 5px;
  font-size: 13.5px;
  line-height: 1.55;
  color: #6B4A38;
  background: linear-gradient(150deg, #FFF0C9, #FFE3B8);
  box-shadow: var(--shadow-sm);
  position: relative;
  white-space: normal;
  word-break: break-word;
  max-height: 132px;
  overflow: hidden;
}
.note .ntext { display: block; white-space: pre-wrap; }
.note.mint { background: linear-gradient(150deg, #DCF4EC, #C6EBDD); color: #2E6B5C; }
.note.lilac { background: linear-gradient(150deg, #EDE4FF, #DED0FA); color: #55407E; }
.note .nfoot {  display: flex; justify-content: space-between; align-items: center;
  margin-top: 10px; font-size: 11px; opacity: .65;
}
.note-add {
  flex: none;
  width: 96px;
  border-radius: 16px;
  border: 1.6px dashed #F0D3D3;
  color: var(--muted);
  display: grid; place-items: center; gap: 4px;
  font-size: 12px;
  background: rgba(255, 255, 255, .5);
}

/* ---------- 相册 ---------- */

.album-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-bottom: 16px;
}
.album-grid .ph {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: #F6EBE9;
}
.album-grid .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.album-grid .ph:active img { transform: scale(1.06); }
.album-grid .ph .tag {
  position: absolute; left: 5px; bottom: 5px;
  padding: 1px 6px; border-radius: 999px;
  background: rgba(0, 0, 0, .42);
  color: #fff; font-size: 10px;
  backdrop-filter: blur(4px);
}

/* ---------- 清单 ---------- */

.progress-card {
  display: flex; align-items: center; gap: 16px;
  background: linear-gradient(135deg, #FFF3F6, #FFF7EF);
  border-radius: var(--r);
  padding: 16px 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #FCEBEF;
}
.ring { position: relative; width: 62px; height: 62px; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring .val {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 700; color: var(--pink-d);
}
.progress-card h3 { font-size: 15px; font-weight: 650; margin-bottom: 3px; }
.progress-card p { font-size: 12.5px; color: var(--muted); }

.todo {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--card);
  border-radius: 18px;
  padding: 14px 15px;
  margin-bottom: 9px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #FCF0EE;
  animation: fadeUp .28s ease both;
}
.tick {
  flex: none;
  width: 24px; height: 24px;
  margin-top: 1px;
  border-radius: 50%;
  border: 2px solid #F0C9CF;
  display: grid; place-items: center;
  color: transparent;
  transition: .2s;
}
.tick svg { width: 14px; height: 14px; }
.todo.done .tick {
  background: linear-gradient(140deg, var(--mint), #4FC0A8);
  border-color: transparent;
  color: #fff;
}
.todo-body { flex: 1; min-width: 0; }
.todo-body h4 { font-size: 14.8px; font-weight: 550; line-height: 1.45; word-break: break-word; }
.todo.done h4 { color: var(--muted); text-decoration: line-through; text-decoration-color: #E0C9CC; }
.todo-body p { font-size: 12.5px; color: var(--muted); margin-top: 3px; word-break: break-word; }
.todo .rm {
  flex: none; width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 9px; color: #D8C2C5;
}

/* ---------- 纪念日 ---------- */

.dday {
  display: flex; align-items: center; gap: 14px;
  background: var(--card);
  border-radius: 20px;
  padding: 15px 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #FCF0EE;
  animation: fadeUp .28s ease both;
}
.dday .em {
  width: 46px; height: 46px; flex: none;
  border-radius: 15px;
  display: grid; place-items: center;
  font-size: 22px;
  background: linear-gradient(140deg, #FFF1F4, #FFE7DA);
}
.dday-info { flex: 1; min-width: 0; }
.dday-info h4 { font-size: 15px; font-weight: 600; }
.dday-info p { font-size: 12px; color: var(--muted); margin-top: 2px; }
.dday-num { text-align: right; flex: none; }
.dday-num b {
  font-size: 26px; font-weight: 800; letter-spacing: -1px;
  color: var(--pink-d); font-variant-numeric: tabular-nums;
  display: block; line-height: 1.1;
}
.dday-num span { font-size: 10.5px; color: var(--muted); }
.dday-num.past b { color: var(--mint); }
.dday-num.today b { color: var(--amber); }

/* ---------- 我们 ---------- */

.profile-card {
  background: linear-gradient(140deg, #FFE8EE, #FFF1E6);
  border-radius: 26px;
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  text-align: center;
}
.profile-card .faces { justify-content: center; margin-bottom: 10px; }
.profile-card .face { width: 62px; height: 62px; font-size: 24px; }
.profile-card .names { font-size: 17px; font-weight: 700; }
.profile-card .since { font-size: 12.5px; color: #97797E; margin-top: 4px; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.stat {
  background: var(--card);
  border-radius: 16px;
  padding: 12px 4px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid #FCF0EE;
}
.stat b { display: block; font-size: 19px; font-weight: 750; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat span { font-size: 10.5px; color: var(--muted); }

.sec {
  background: var(--card);
  border-radius: var(--r);
  padding: 6px 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #FCF0EE;
}
.sec-title {
  font-size: 12px; color: var(--muted); font-weight: 600;
  padding: 12px 2px 6px; letter-spacing: .4px;
}
.row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 2px;
  border-bottom: 1px solid #FBF1EF;
  width: 100%;
  text-align: left;
}
.row:last-child { border-bottom: 0; }
.row .r-ic {
  width: 34px; height: 34px; flex: none;
  border-radius: 11px;
  display: grid; place-items: center;
  background: #FFF3F5;
  color: var(--pink-d);
}
.row .r-main { flex: 1; min-width: 0; }
.row .r-main h4 { font-size: 14.5px; font-weight: 500; }
.row .r-main p { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.row .r-end { font-size: 13px; color: var(--muted); }
.row.danger .r-ic { background: #FFF0F0; color: #E05B5B; }
.row.danger h4 { color: #D84848; }

/* 心情月历 */
.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: 38px;
  gap: 4px;
  padding: 6px 0 14px;
}
.calendar .wd {
  text-align: center;
  font-size: 10.5px;
  color: var(--muted);
  padding-bottom: 2px;
}
.cal-cell {
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #FFF9F8;
  color: #C4B0B3;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}
.cal-cell.has { background: #FFE9EF; }
.cal-cell.today { box-shadow: 0 0 0 1.6px var(--pink); color: var(--pink-d); font-weight: 600; }
.cal-cell.blank { background: transparent; }

/* ---------- 空状态 ---------- */

.empty {
  text-align: center;
  padding: 34px 20px;
  border-radius: var(--r);
  border: 1.6px dashed #F0DAD8;
  background: rgba(255, 255, 255, .55);
  color: var(--muted);
  font-size: 13.5px;
}
.empty .big { font-size: 34px; display: block; margin-bottom: 8px; }
.empty b { display: block; color: var(--ink2); font-size: 14.5px; margin-bottom: 4px; }

/* ---------- 底部弹层 ---------- */

.sheet-wrap { position: fixed; inset: 0; z-index: 60; }
.sheet-mask {
  position: absolute; inset: 0;
  background: rgba(58, 34, 38, .38);
  backdrop-filter: blur(3px);
  animation: fadeIn .2s ease both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.sheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  background: #FFFCFA;
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -18px 50px -20px rgba(90, 50, 58, .45);
  animation: slideUp .3s cubic-bezier(.22, 1, .36, 1) both;
  padding-bottom: var(--safe-b);
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@media (min-width: 600px) {
  .sheet { left: 50%; right: auto; width: 520px; transform: translateX(-50%); bottom: 24px; border-radius: 28px; animation-name: slideUpC; }
  @keyframes slideUpC { from { opacity: 0; transform: translate(-50%, 26px); } to { opacity: 1; transform: translate(-50%, 0); } }
}

/* ---------- 居中确认框 ---------- */

.mini-modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 24px; }
.mini-mask { position: absolute; inset: 0; background: rgba(58, 34, 38, .42); backdrop-filter: blur(3px); opacity: 0; transition: opacity .18s; }
.mini-card {
  position: relative;
  width: 100%; max-width: 330px;
  background: #FFFCFA;
  border-radius: 22px;
  padding: 22px 20px 16px;
  box-shadow: 0 30px 70px -20px rgba(80, 40, 50, .5);
  opacity: 0; transform: scale(.94);
  transition: opacity .2s, transform .24s cubic-bezier(.34, 1.4, .64, 1);
}
.mini-modal.in .mini-mask { opacity: 1; }
.mini-modal.in .mini-card { opacity: 1; transform: none; }
.mini-card h3 { font-size: 16.5px; font-weight: 700; margin-bottom: 8px; }
.mini-card p { font-size: 13.5px; color: var(--ink2); line-height: 1.7; white-space: pre-wrap; }
.mini-foot { display: flex; gap: 9px; margin-top: 18px; }
.btn-danger-solid { background: linear-gradient(140deg, #FF7A7A, #EE4F4F); color: #fff; box-shadow: 0 10px 22px -10px rgba(238, 79, 79, .8); }

.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 18px 8px;
  flex: none;
}
.sheet-head h2 { font-size: 17px; font-weight: 700; letter-spacing: -.2px; }
.sheet-body {
  overflow-y: auto;
  padding: 6px 18px 12px;
  -webkit-overflow-scrolling: touch;
}
.sheet-foot {
  display: flex; gap: 10px;
  padding: 10px 18px 16px;
  flex: none;
  background: linear-gradient(to top, #FFFCFA 60%, rgba(255, 252, 250, 0));
}

/* ---------- 表单 ---------- */

.field { margin-bottom: 14px; }
.field > label {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 6px;
}
.input, textarea.input, select.input {
  width: 100%;
  border: 1.5px solid var(--line);
  background: #FFF9F8;
  border-radius: 14px;
  padding: 11px 13px;
  color: var(--ink);
  outline: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
  -webkit-appearance: none;
  appearance: none;
}
textarea.input { resize: vertical; min-height: 104px; line-height: 1.6; }
.input:focus {
  border-color: #FFB6C7;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 182, 199, .22);
}
.input::placeholder { color: #C9B8BA; }
select.input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23A99A9C' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
input[type="date"].input { min-height: 44px; }

.picker { display: flex; gap: 6px; flex-wrap: wrap; }
.pick {
  padding: 8px 12px;
  border-radius: 12px;
  background: #FFF7F6;
  border: 1.5px solid var(--line);
  font-size: 13px;
  color: var(--ink2);
  display: inline-flex; align-items: center; gap: 5px;
}
.pick.on { background: var(--pink-l); border-color: #FFC2D1; color: var(--pink-d); font-weight: 600; }

.add-photos {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.add-photos .slot {
  width: 74px; height: 74px;
  border-radius: 14px;
  border: 1.6px dashed #EFCFD4;
  background: #FFF9F8;
  display: grid; place-items: center;
  color: #CBB2B6;
  position: relative;
  overflow: hidden;
}
.add-photos .slot img { width: 100%; height: 100%; object-fit: cover; }
.add-photos .slot .x {
  position: absolute; top: 3px; right: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(40, 20, 24, .6); color: #fff;
  display: grid; place-items: center; font-size: 12px;
}

.btn {
  flex: 1;
  min-height: 46px;
  border-radius: 15px;
  font-size: 15px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform .16s, filter .16s;
}
.btn:active { transform: scale(.975); }
.btn-primary {
  background: linear-gradient(140deg, var(--pink) 0%, #FF9A76 100%);
  color: #fff;
  box-shadow: 0 10px 22px -10px rgba(255, 111, 145, .9);
}
.btn-ghost { background: #F6EBE9; color: var(--ink2); }
.btn-text { flex: none; padding: 0 14px; min-height: 46px; color: var(--muted); }
.btn-danger { background: #FFEFEF; color: #D84848; }

.hint { font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.hint.warn { color: #C9843A; background: #FFF7EA; padding: 10px 12px; border-radius: 12px; }

/* ---------- 灯箱 ---------- */

.lightbox {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(28, 18, 20, .94);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn .2s ease both;
}
.lb-fig { display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 96vw; }
.lb-fig img { max-height: 78dvh; max-width: 96vw; border-radius: 12px; object-fit: contain; }
.lb-fig figcaption { color: rgba(255, 255, 255, .72); font-size: 12.5px; text-align: center; padding: 0 24px; white-space: pre-wrap; }
.lb-close {
  position: absolute; top: calc(14px + var(--safe-t)); right: 14px;
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .14); color: #fff;
}
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .9);
}
.lb-prev { left: 10px; }
.lb-next { right: 10px; }

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(120px + var(--safe-b));
  transform: translate(-50%, 12px);
  background: rgba(52, 34, 38, .92);
  color: #fff;
  font-size: 13.5px;
  padding: 10px 18px;
  border-radius: 999px;
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .5);
  opacity: 0;
  transition: opacity .22s, transform .22s;
  z-index: 90;
  max-width: 82vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 引导 ---------- */

.onboard-hero {
  text-align: center;
  padding: 10px 4px 18px;
}
.onboard-hero .big { font-size: 40px; display: block; margin-bottom: 8px; }
.onboard-hero h2 { font-size: 19px; font-weight: 700; letter-spacing: -.3px; }
.onboard-hero p { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.7; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

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

/* =========================================================
   云同步：状态胶囊 / 账号面板 / 徽标
   ========================================================= */

.sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
  background: #F4EDEA;
  color: #9C8689;
  transition: background .2s, color .2s;
  white-space: nowrap;
}
.sync-pill.ok { background: #E4F5EF; color: #2C9A83; }
.sync-pill.busy { background: #FFF2DF; color: #B4813A; }
.sync-pill.busy svg { animation: spin 1.1s linear infinite; }
.sync-pill.err { background: #FFEAEA; color: #D84848; }
@keyframes spin { to { transform: rotate(360deg); } }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
}
.badge.ok { background: #E4F5EF; color: #2C9A83; }
.badge.busy { background: #FFF2DF; color: #B4813A; }
.badge.err { background: #FFEAEA; color: #D84848; }

.acc-head {
  background: linear-gradient(140deg, #FFF0F4, #FFF6EC);
  border-radius: 18px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.acc-mail { font-size: 14.5px; font-weight: 650; word-break: break-all; }
.acc-space { font-size: 12px; color: var(--muted); margin-top: 3px; }

.invite-box {
  border: 1.6px dashed #F0C9D2;
  border-radius: 18px;
  padding: 14px;
  text-align: center;
  margin-bottom: 12px;
  background: #FFFBFC;
}
.invite-label { font-size: 11px; color: var(--muted); letter-spacing: 1px; }
.invite-code {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 6px;
  color: var(--pink-d);
  font-variant-numeric: tabular-nums;
  margin: 2px 0 6px;
  padding-left: 6px;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--pink-d);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 10px;
  background: #FFF4F6;
  width: 100%;
}

.sync-line {
  font-size: 12.5px;
  color: var(--muted);
  padding: 2px 2px 10px;
}
.sync-line.bad { color: #D84848; }

.or-sep {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #C6B4B6;
  font-size: 11.5px;
  margin: 4px 0 16px;
}
.or-sep::before, .or-sep::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* =========================================================
   地图
   ========================================================= */

.map-wrap {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid #F0E4E1;
  background: #EFECE7;
}
.map {
  position: relative;
  height: 300px;
  overflow: hidden;
  background: #EFECE7;
  touch-action: none;
  cursor: grab;
  user-select: none;
}
.map.dragging { cursor: grabbing; }
.map-layer {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  will-change: transform;
}
.map-tile {
  position: absolute;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  max-width: none;
  max-height: none;
}
.map-tiles-failed::after {
  content: "地图瓦片加载失败，可能没网";
  position: absolute;
  left: 50%;
  top: 12px;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
}

.map-pin {
  position: absolute;
  z-index: 2;
  cursor: pointer;
  transform: translate(-50%, -50%);
}
.map-pin i {
  display: block;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: linear-gradient(140deg, #FF6F91, #FF9A76);
  border: 2.5px solid #fff;
  box-shadow: 0 3px 10px rgba(190, 80, 100, .45);
  transition: transform .18s, background .18s;
}
.map-pin span {
  position: absolute;
  left: 50%;
  top: 17px;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 10px;
  color: #5B474B;
  background: rgba(255, 255, 255, .9);
  padding: 1px 6px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .1);
  pointer-events: none;
}
.map-pin.on i {
  background: linear-gradient(140deg, #7BC4FF, #4A8FE0);
  transform: scale(1.25);
}

.map-ctl {
  position: absolute;
  right: 10px;
  top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.map-ctl button {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .92);
  color: var(--ink2);
  display: grid;
  place-items: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .14);
  backdrop-filter: blur(4px);
}
.map-ctl button:active { transform: scale(.92); }

.map-locate {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  color: var(--ink2);
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .14);
}

.map-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #8D787C;
  font-size: 12.5px;
  text-align: center;
  background: linear-gradient(160deg, rgba(255, 247, 244, .86), rgba(255, 240, 236, .9));
  pointer-events: none;
}
.map-empty b { color: var(--pink-d); font-weight: 600; }

/* 足迹卡片 */
.place-card {
  display: flex;
  gap: 11px;
  background: var(--card);
  border-radius: 18px;
  padding: 13px 15px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #FCF0EE;
  transition: box-shadow .3s, transform .2s;
  animation: fadeUp .28s ease both;
}
.place-card.hl { box-shadow: 0 0 0 2px var(--pink), var(--shadow); transform: scale(1.01); }
.place-line {
  flex: none;
  width: 4px;
  border-radius: 3px;
  background: linear-gradient(180deg, #FFC2D1, #FFE0C7);
}
.place-body { flex: 1; min-width: 0; }
.place-head { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.place-head b { font-size: 15px; font-weight: 650; }
.place-city {
  font-size: 10.5px;
  color: #4A6FD0;
  background: #EAF1FF;
  padding: 1px 7px;
  border-radius: 999px;
  font-weight: 600;
}
.place-date { margin-left: auto; font-size: 11px; color: var(--muted); }
.place-note { font-size: 13px; color: var(--ink2); margin-top: 4px; line-height: 1.6; }
.place-photos { display: flex; gap: 4px; margin-top: 8px; }
.place-photos .ph {
  width: 62px; height: 62px;
  border-radius: 10px;
  overflow: hidden;
  background: #F6EBE9;
}
.place-photos .ph img { width: 100%; height: 100%; object-fit: cover; }
.place-photos .ph.more {
  display: grid; place-items: center;
  font-size: 12px; color: var(--muted);
  background: #FBF1EF;
}

/* 提醒条 */
.remind-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 12px 15px;
  border-radius: 16px;
  background: #FFF8E9;
  color: #A8763A;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 14px;
  border: 1px solid #FBEDD3;
}
.remind-bar span { flex: 1; text-align: left; }
.remind-bar.on { background: #EFF8F5; color: #2C9A83; border-color: #DCF0E9; }
.remind-bar svg:last-child { opacity: .6; }
