/* ============================================================
   我们俩 · 设计系统
   ============================================================ */
:root {
  --bg: #fdf5f3;
  --bg-2: #f8e9ec;
  --card: #ffffff;
  --card-soft: #fffaf9;
  --ink: #3b2a31;
  --ink-soft: #5f4a53;
  --muted: #9c848d;
  --line: #f1dfe4;
  --brand: #e25670;
  --brand-deep: #c93e5c;
  --brand-soft: #ffe4ea;
  --accent: #a87fd1;
  --accent-soft: #f3ecfb;
  --gold: #d9a441;
  --ok: #3e9a78;
  --danger: #d84343;
  --shadow: 0 14px 40px -26px rgba(120, 56, 74, 0.55);
  --shadow-soft: 0 8px 24px -18px rgba(120, 56, 74, 0.4);
  --radius: 22px;
  --radius-sm: 14px;
  --serif: "Iowan Old Style", "Palatino Linotype", "Songti SC", "Noto Serif SC", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --nav-h: 62px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

[data-theme="cream"] {
  --bg: #fbf6ec;
  --bg-2: #f5ecdc;
  --card: #fffdf8;
  --card-soft: #fffaf0;
  --ink: #40332a;
  --ink-soft: #63503f;
  --muted: #9b8a78;
  --line: #eee1cc;
  --brand: #c8784b;
  --brand-deep: #ac5f35;
  --brand-soft: #fbe7d6;
  --accent: #8fa27b;
  --accent-soft: #eef2e6;
  --gold: #c79a3f;
}

[data-theme="night"] {
  --bg: #16121a;
  --bg-2: #211a26;
  --card: #221c27;
  --card-soft: #2a222f;
  --ink: #f4e9ef;
  --ink-soft: #d6c4ce;
  --muted: #a08c99;
  --line: #352a3a;
  --brand: #ff7897;
  --brand-deep: #ff5c82;
  --brand-soft: #3a2330;
  --accent: #b795e0;
  --accent-soft: #2e2438;
  --gold: #e0b45f;
  --ok: #5fbf98;
  --shadow: 0 16px 44px -26px rgba(0, 0, 0, 0.85);
  --shadow-soft: 0 10px 30px -20px rgba(0, 0, 0, 0.8);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(1000px 520px at 8% -12%, var(--bg-2), transparent 62%),
    radial-gradient(760px 480px at 108% 4%, rgba(168, 127, 209, 0.13), transparent 60%);
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.spacer { flex: 1; }
.hidden { display: none !important; }

/* ---------------- 启动画面 ---------------- */
.boot-splash {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
}
.boot-heart { font-size: 46px; animation: heartbeat 1.4s ease-in-out infinite; }
.boot-text { color: var(--muted); letter-spacing: 0.3em; font-size: 13px; }
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  14% { transform: scale(1.16); }
  28% { transform: scale(1); }
  42% { transform: scale(1.1); }
}

/* ---------------- 应用骨架 ---------------- */
.app { min-height: 100vh; }
.main-wrap { min-height: 100vh; display: flex; flex-direction: column; }
.view { flex: 1; padding: 20px 18px calc(var(--nav-h) + 40px + var(--safe-bottom)); max-width: 860px; width: 100%; margin: 0 auto; }

.side { display: none; }
.topbar { display: none; }
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  height: calc(var(--nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.tab {
  display: grid;
  place-items: center;
  gap: 2px;
  padding-top: 7px;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.02em;
  transition: color 0.2s ease, transform 0.2s ease;
}
.tab .icon { width: 23px; height: 23px; }
.tab.active { color: var(--brand); }
.tab.active .icon { transform: translateY(-1px) scale(1.03); }
.tab:active { transform: scale(0.94); }

/* 桌面侧栏 */
@media (min-width: 980px) {
  .app { display: grid; grid-template-columns: 248px minmax(0, 1fr); }
  .side {
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 26px 18px 20px;
    border-right: 1px solid var(--line);
    background: color-mix(in srgb, var(--card) 62%, transparent);
    backdrop-filter: blur(12px);
  }
  .side-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 6px; }
  .side-logo {
    width: 40px; height: 40px; border-radius: 14px;
    display: grid; place-items: center;
    background: linear-gradient(140deg, var(--brand), var(--accent));
    color: #fff; font-size: 20px;
    box-shadow: var(--shadow-soft);
  }
  .side-name { font-family: var(--serif); font-size: 17px; font-weight: 600; letter-spacing: 0.02em; }
  .side-sub { font-size: 11px; color: var(--muted); }
  .side-nav { display: grid; gap: 4px; }
  .nav-link {
    display: flex; align-items: center; gap: 11px;
    padding: 10px 12px; border-radius: 13px;
    color: var(--ink-soft); font-size: 14px;
    transition: background 0.18s ease, color 0.18s ease;
  }
  .nav-link .icon { width: 20px; height: 20px; color: var(--muted); }
  .nav-link:hover { background: var(--card-soft); }
  .nav-link.active { background: var(--brand-soft); color: var(--brand-deep); font-weight: 600; }
  .nav-link.active .icon { color: var(--brand-deep); }
  .side-foot { margin-top: auto; display: grid; gap: 10px; }
  .side-user { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; }
  .side-user:hover { background: var(--card-soft); }
  .side-avatar {
    width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center;
    background: var(--brand-soft); color: var(--brand-deep); font-weight: 700;
  }
  .tabbar { display: none; }
  .view { padding: 34px 40px 60px; }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px 8px;
  background: linear-gradient(to bottom, var(--bg) 62%, transparent);
  backdrop-filter: blur(8px);
}
.topbar-title { font-family: var(--serif); font-size: 16px; font-weight: 600; }
.topbar-date { font-size: 11.5px; color: var(--muted); }
@media (min-width: 980px) {
  .topbar { display: none; }
}

/* 头像按钮 */
.avatar-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--brand), var(--accent));
  color: #fff; font-size: 14px; font-weight: 700;
  border: 2px solid var(--card);
  box-shadow: var(--shadow-soft);
}
.avatar-btn.lg { width: 46px; height: 46px; font-size: 17px; }

.avatar-menu {
  position: fixed;
  top: 56px; right: 16px;
  z-index: 60;
  min-width: 190px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 22px 50px -24px rgba(60, 20, 34, 0.4);
  padding: 8px;
  animation: pop 0.16s ease;
}
.avatar-menu .menu-me { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.avatar-menu .menu-me b { font-size: 14px; }
.avatar-menu .menu-me span { display: block; font-size: 11.5px; color: var(--muted); }
.avatar-menu button, .avatar-menu a {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border-radius: 11px; font-size: 14px; color: var(--ink-soft);
}
.avatar-menu button:hover, .avatar-menu a:hover { background: var(--card-soft); }
.avatar-menu .icon { width: 18px; height: 18px; color: var(--muted); }
.avatar-menu .danger { color: var(--danger); }

@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(0.98); } }

/* ---------------- 页面通用 ---------------- */
.page { display: grid; gap: 18px; animation: fadeUp 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } }

.page-head { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 2px; }
.page-head .spacer { flex: 1; }
.page-title { font-family: var(--serif); font-size: 27px; line-height: 1.2; letter-spacing: 0.01em; }
.page-sub { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.page-actions { display: flex; gap: 8px; align-items: center; }

.section { display: grid; gap: 10px; }
.section-head { display: flex; align-items: center; gap: 8px; padding: 0 2px; }
.section-title { font-size: 13px; letter-spacing: 0.12em; color: var(--muted); font-weight: 600; }
.section-head .link { margin-left: auto; font-size: 12px; color: var(--brand-deep); display: flex; align-items: center; gap: 2px; }
.section-head .link .icon { width: 14px; height: 14px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-pad { padding: 18px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 16px; border-radius: 13px;
  background: var(--card); border: 1px solid var(--line);
  font-size: 14px; font-weight: 500; color: var(--ink-soft);
  transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:hover { filter: brightness(0.98); }
.btn:active { transform: scale(0.96); }
.btn .icon { width: 18px; height: 18px; }
.btn.primary { background: linear-gradient(135deg, var(--brand), var(--brand-deep)); border: 0; color: #fff; box-shadow: 0 10px 24px -14px var(--brand); }
.btn.soft { background: var(--brand-soft); color: var(--brand-deep); border-color: transparent; }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink-soft); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.small { padding: 7px 11px; font-size: 12.5px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: 0.55; pointer-events: none; }

.icon-btn {
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--card); border: 1px solid var(--line);
  color: var(--ink-soft);
  transition: transform 0.15s ease;
}
.icon-btn:active { transform: scale(0.92); }
.icon-btn.plain { background: transparent; border: 0; }
.icon-btn .icon { width: 20px; height: 20px; }

.chip-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 7px 13px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line);
  color: var(--ink-soft); font-size: 13px;
  transition: all 0.18s ease;
}
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 8px 18px -12px var(--brand); }

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-deep);
  font-size: 11.5px; font-weight: 600;
}
.pill.plain { background: var(--card-soft); color: var(--muted); border: 1px solid var(--line); font-weight: 500; }
.pill.gold { background: rgba(217, 164, 65, 0.16); color: var(--gold); }
.pill.ok { background: rgba(62, 154, 120, 0.14); color: var(--ok); }

.empty {
  display: grid; justify-items: center; gap: 6px;
  padding: 38px 20px; text-align: center;
  color: var(--muted);
}
.empty-icon {
  width: 62px; height: 62px; border-radius: 22px;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand);
  margin-bottom: 4px;
}
.empty-icon .icon { width: 30px; height: 30px; }
.empty-title { color: var(--ink-soft); font-weight: 600; font-size: 14.5px; }
.empty-desc { font-size: 12.5px; max-width: 260px; }
.empty .btn { margin-top: 10px; }

.divider { height: 1px; background: var(--line); border: 0; margin: 4px 0; }

.skeleton {
  border-radius: var(--radius);
  background: linear-gradient(100deg, var(--line) 30%, var(--card) 50%, var(--line) 70%);
  background-size: 220% 100%;
  animation: shimmer 1.2s linear infinite;
}
@keyframes shimmer { to { background-position: -120% 0; } }

/* ---------------- Toast ---------------- */
.toasts {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 26px + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 100;
  display: grid; gap: 8px; justify-items: center;
  width: min(92vw, 420px);
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 92%, transparent);
  color: #fff; font-size: 13px;
  box-shadow: 0 16px 34px -18px rgba(0, 0, 0, 0.5);
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast .icon { width: 16px; height: 16px; }
.toast-ok .icon { color: #8fe0bd; }
.toast-err .icon { color: #ffb1b1; }
@media (min-width: 980px) { .toasts { bottom: 28px; } }

/* ---------------- 弹窗 ---------------- */
dialog.modal {
  width: min(94vw, 480px);
  max-height: min(88vh, 760px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 40px 80px -40px rgba(40, 12, 24, 0.55);
  overflow: hidden;
}
dialog.modal[open] { animation: modalIn 0.24s cubic-bezier(0.22, 1, 0.36, 1); }
dialog.modal::backdrop { background: rgba(46, 22, 32, 0.42); backdrop-filter: blur(4px); }
.modal-wide { width: min(96vw, 720px); }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(0.98); } }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 10px; }
.modal-head h3 { font-family: var(--serif); font-size: 19px; flex: 1; font-weight: 600; }
.modal-body { padding: 4px 18px 18px; overflow-y: auto; max-height: min(66vh, 620px); overscroll-behavior: contain; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px 18px; border-top: 1px solid var(--line); }
.dialog-text { color: var(--ink-soft); font-size: 14px; }

/* ---------------- 表单 ---------------- */
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field > label { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: 0.04em; }
.input, .textarea, .select {
  width: 100%;
  padding: 11px 13px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--card-soft);
  color: var(--ink);
  font-size: 14.5px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
  appearance: none;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent);
}
.textarea { min-height: 96px; resize: vertical; line-height: 1.65; }
.select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-grid .span2 { grid-column: span 2; }
.form-hint { font-size: 11.5px; color: var(--muted); }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }

.seg { display: flex; padding: 3px; background: var(--card-soft); border: 1px solid var(--line); border-radius: 12px; }
.seg button { flex: 1; padding: 7px 8px; border-radius: 9px; font-size: 13px; color: var(--muted); }
.seg button.active { background: var(--card); color: var(--brand-deep); font-weight: 600; box-shadow: var(--shadow-soft); }

.color-row { display: flex; gap: 9px; flex-wrap: wrap; }
.color-dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; box-shadow: inset 0 0 0 2px var(--card); }
.color-dot.active { border-color: var(--ink); transform: scale(1.08); }

.emoji-row { display: flex; gap: 6px; flex-wrap: wrap; }
.emoji {
  width: 38px; height: 38px; border-radius: 12px; font-size: 19px;
  display: grid; place-items: center;
  background: var(--card-soft); border: 1px solid var(--line);
}
.emoji.active { background: var(--brand-soft); border-color: var(--brand); transform: scale(1.05); }

/* ---------------- 登录 / 初始化 ---------------- */
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 26px 18px calc(26px + var(--safe-bottom));
  position: relative;
  overflow: hidden;
}
.auth-decor { position: absolute; font-size: 22px; opacity: 0.35; animation: floaty 9s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-16px) rotate(6deg); } }
.auth-card {
  width: min(100%, 430px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 30px 26px 26px;
  position: relative;
  animation: fadeUp 0.45s ease;
}
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.auth-logo {
  width: 46px; height: 46px; border-radius: 16px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--brand), var(--accent));
  color: #fff; font-size: 23px;
  box-shadow: 0 12px 26px -14px var(--brand);
}
.auth-brand-name { font-family: var(--serif); font-size: 19px; font-weight: 600; }
.auth-brand-sub { font-size: 11.5px; color: var(--muted); letter-spacing: 0.08em; }
.auth-title { font-family: var(--serif); font-size: 25px; line-height: 1.25; margin-bottom: 6px; }
.auth-sub { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.auth-switch { text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 16px; }
.auth-switch a { color: var(--brand-deep); font-weight: 600; }
.auth-error { color: var(--danger); font-size: 12.5px; min-height: 18px; margin-top: 2px; }
.auth-footnote { margin-top: 16px; font-size: 11.5px; color: var(--muted); text-align: center; line-height: 1.7; }
.steps { display: flex; gap: 6px; margin-bottom: 18px; }
.steps span { height: 4px; flex: 1; border-radius: 4px; background: var(--line); }
.steps span.on { background: var(--brand); }
.invite-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 30px; letter-spacing: 0.22em; font-weight: 700;
  color: var(--brand-deep); text-align: center;
  padding: 16px; border-radius: 16px;
  background: var(--brand-soft);
  margin: 10px 0 4px;
  word-break: break-all;
}

/* ---------------- 首页 ---------------- */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  min-height: 210px;
  padding: 24px;
  color: #fff;
  background: linear-gradient(135deg, #e25670 0%, #cf5e8b 46%, #a87fd1 100%);
  box-shadow: 0 24px 54px -30px rgba(201, 62, 92, 0.75);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
}
.hero.has-cover { background-size: cover; background-position: center; }
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(38, 12, 22, 0.62), rgba(38, 12, 22, 0.08) 62%);
}
.hero > * { position: relative; z-index: 1; }
.hero-top { position: absolute; top: 18px; left: 22px; right: 22px; display: flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.92; }
.hero-top .icon { width: 15px; height: 15px; }
.hero-days { font-family: var(--serif); font-size: 58px; line-height: 1; font-weight: 600; letter-spacing: -0.02em; }
.hero-days small { font-size: 15px; font-family: var(--sans); font-weight: 500; margin-left: 6px; opacity: 0.9; }
.hero-label { font-size: 13px; opacity: 0.92; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; opacity: 0.86; margin-top: 6px; }
.hero-meta .icon { width: 14px; height: 14px; vertical-align: -2px; margin-right: 3px; }

.reminder-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 15px; border-radius: 16px;
  background: linear-gradient(135deg, var(--brand-soft), var(--accent-soft));
  border: 1px solid var(--line);
  font-size: 13px; color: var(--ink-soft);
}
.reminder-banner .icon { color: var(--brand-deep); }
.reminder-banner b { color: var(--brand-deep); }
.reminder-banner .btn { margin-left: auto; }

.countdown-row { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.countdown-row::-webkit-scrollbar { display: none; }
.countdown-card {
  flex: none; min-width: 148px;
  padding: 14px 15px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  display: grid; gap: 3px;
}
.countdown-card .cc-title { font-size: 13.5px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.countdown-card .cc-days { font-family: var(--serif); font-size: 26px; color: var(--brand-deep); line-height: 1.1; }
.countdown-card .cc-days small { font-family: var(--sans); font-size: 12px; color: var(--muted); margin-left: 3px; }
.countdown-card .cc-meta { font-size: 11px; color: var(--muted); }
.countdown-card.today { background: linear-gradient(140deg, var(--brand), var(--brand-deep)); border-color: transparent; color: #fff; }
.countdown-card.today .cc-title, .countdown-card.today .cc-days, .countdown-card.today .cc-meta { color: #fff; }
.countdown-card.today .cc-meta { opacity: 0.8; }

.today-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.today-lunar { display: grid; justify-items: center; gap: 0; padding-right: 14px; border-right: 1px solid var(--line); }
.today-lunar b { font-family: var(--serif); font-size: 22px; line-height: 1.2; }
.today-lunar span { font-size: 11px; color: var(--muted); }
.today-info { flex: 1; min-width: 0; }
.today-info .ti-date { font-size: 14px; font-weight: 600; }
.today-info .ti-events { font-size: 12px; color: var(--muted); margin-top: 2px; }

.photo-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.photo-strip .thumb {
  position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden;
  background: var(--card-soft); border: 1px solid var(--line);
}
.photo-strip .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.photo-strip .thumb:hover img { transform: scale(1.05); }
.photo-strip .more-tile {
  display: grid; place-items: center; gap: 2px;
  font-size: 11px; color: var(--muted);
  background: var(--card-soft);
}

.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stat { padding: 13px 6px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); text-align: center; }
.stat b { display: block; font-family: var(--serif); font-size: 20px; line-height: 1.2; }
.stat span { font-size: 11px; color: var(--muted); }

.moment-preview { display: grid; gap: 8px; }
.moment-preview .mp-head { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.moment-preview .mp-body { font-size: 14.5px; color: var(--ink-soft); line-height: 1.75; white-space: pre-wrap; }
.moment-preview .mp-mood { font-size: 18px; }

.place-preview { display: flex; align-items: center; gap: 12px; }
.place-preview .pp-thumb { width: 54px; height: 54px; border-radius: 14px; object-fit: cover; background: var(--card-soft); }
.place-preview .pp-name { font-weight: 600; font-size: 14px; }
.place-preview .pp-meta { font-size: 11.5px; color: var(--muted); }

@media (min-width: 700px) {
  .photo-strip { grid-template-columns: repeat(6, 1fr); }
  .home-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 16px; align-items: start; }
}

/* ---------------- 日历 ---------------- */
.cal-card { padding: 16px 14px 10px; }
.cal-head { display: flex; align-items: center; gap: 8px; padding: 0 4px 12px; }
.cal-title { font-family: var(--serif); font-size: 20px; font-weight: 600; }
.cal-sub { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.cal-nav { display: flex; gap: 6px; margin-left: auto; }
.cal-nav .icon-btn { width: 32px; height: 32px; border-radius: 10px; }
.cal-nav .icon-btn .icon { width: 17px; height: 17px; }
.cal-week { display: grid; grid-template-columns: repeat(7, 1fr); padding: 0 2px 6px; }
.cal-week span { text-align: center; font-size: 11px; color: var(--muted); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-cell {
  position: relative;
  min-height: 58px;
  padding: 6px 2px 4px;
  border-radius: 13px;
  display: grid; align-content: start; justify-items: center; gap: 1px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.cal-cell:hover { background: var(--card-soft); }
.cal-cell .cd { font-size: 14px; line-height: 1.3; font-weight: 500; }
.cal-cell .cl { font-size: 9.5px; color: var(--muted); line-height: 1.2; transform: scale(0.95); white-space: nowrap; }
.cal-cell.out { opacity: 0.32; }
.cal-cell.wknd .cd { color: var(--brand-deep); }
.cal-cell.today .cd {
  color: #fff; background: var(--brand); border-radius: 50%;
  width: 25px; height: 25px; display: grid; place-items: center; font-weight: 600;
}
.cal-cell.selected { background: var(--brand-soft); }
.cal-cell.selected .cd { color: var(--brand-deep); font-weight: 700; }
.cal-cell.today .cd,
.cal-cell.today.selected .cd {
  color: #fff;
  background: var(--brand);
  border-radius: 50%;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  font-weight: 600;
}
.cal-dots { display: flex; gap: 2px; height: 5px; align-items: center; }
.cal-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--brand); display: block; }
.cal-dots i.birthday { background: var(--gold); }
.cal-dots i.other { background: var(--accent); }
.cal-legend { display: flex; gap: 12px; justify-content: center; padding: 8px 0 2px; font-size: 10.5px; color: var(--muted); }
.cal-legend i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 4px; }

.day-panel { display: grid; gap: 10px; }
.day-panel-head { display: flex; align-items: center; gap: 10px; padding: 0 2px; }
.day-panel-head b { font-family: var(--serif); font-size: 17px; }
.day-panel-head span { font-size: 12px; color: var(--muted); }
.day-panel-head .btn { margin-left: auto; }
.event-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--line);
  transition: transform 0.15s ease;
}
.event-row:active { transform: scale(0.99); }
.event-icon {
  width: 40px; height: 40px; border-radius: 13px;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-deep);
  font-size: 18px; flex: none;
}
.event-icon.birthday { background: rgba(217, 164, 65, 0.16); color: var(--gold); }
.event-icon.other { background: var(--accent-soft); color: var(--accent); }
.event-main { flex: 1; min-width: 0; }
.event-title { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.event-title .nth { font-size: 11px; color: var(--brand-deep); background: var(--brand-soft); padding: 1px 7px; border-radius: 99px; font-weight: 500; }
.event-meta { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.event-note { font-size: 12px; color: var(--muted); margin-top: 4px; }
.event-actions { display: flex; gap: 4px; }
.event-actions .icon-btn { width: 30px; height: 30px; border-radius: 9px; background: transparent; border: 0; color: var(--muted); }
.event-actions .icon-btn .icon { width: 16px; height: 16px; }

.month-list { display: grid; gap: 8px; }
.month-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: 15px;
  background: var(--card-soft); border: 1px solid var(--line);
}
.month-item .md { font-family: var(--serif); font-size: 20px; width: 52px; color: var(--brand-deep); text-align: center; }
.month-item .md span { display: block; font-family: var(--sans); font-size: 10px; color: var(--muted); }
.month-item .mi-title { font-size: 13.5px; font-weight: 600; }
.month-item .mi-meta { font-size: 11px; color: var(--muted); }

/* ---------------- 相册 ---------------- */
.album-bar { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.album-bar::-webkit-scrollbar { display: none; }
.photo-groups { display: grid; gap: 20px; }
.month-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.month-head b { font-family: var(--serif); font-size: 16px; }
.month-head span { font-size: 11px; color: var(--muted); }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
@media (min-width: 640px) { .photo-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; } }
@media (min-width: 980px) { .photo-grid { grid-template-columns: repeat(5, 1fr); } }
.photo-item {
  position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden;
  background: var(--card-soft); border: 1px solid var(--line);
  cursor: zoom-in;
}
.photo-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.45s ease; }
.photo-item:hover img { transform: scale(1.04); }
.photo-item .pi-badge {
  position: absolute; left: 6px; bottom: 6px;
  padding: 2px 7px; border-radius: 999px;
  font-size: 10px; color: #fff;
  background: rgba(30, 12, 20, 0.45);
  backdrop-filter: blur(4px);
  max-width: calc(100% - 12px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.photo-item.uploading { display: grid; place-items: center; }
.photo-item.uploading .spin { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--brand); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.fab {
  position: fixed;
  right: 18px;
  bottom: calc(var(--nav-h) + 18px + var(--safe-bottom));
  z-index: 35;
  width: 54px; height: 54px; border-radius: 19px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #fff; border: 0;
  box-shadow: 0 18px 34px -16px var(--brand);
  transition: transform 0.18s ease;
}
.fab:active { transform: scale(0.93); }
.fab .icon { width: 24px; height: 24px; }
@media (min-width: 980px) { .fab { bottom: 30px; right: 34px; } }

dialog.lightbox {
  width: min(96vw, 860px);
  max-height: 92vh;
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: color-mix(in srgb, var(--card) 96%, transparent);
  overflow: hidden;
}
dialog.lightbox::backdrop { background: rgba(24, 8, 14, 0.7); backdrop-filter: blur(6px); }
.lb-stage { position: relative; background: #140c11; display: grid; place-items: center; min-height: 200px; }
.lb-stage img { max-height: 66vh; width: auto; max-width: 100%; object-fit: contain; }
.lb-close { position: absolute; top: 10px; right: 10px; background: rgba(30, 12, 20, 0.5); color: #fff; border: 0; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%; background: rgba(30, 12, 20, 0.45); color: #fff; display: grid; place-items: center; border: 0; }
.lb-nav.prev { left: 10px; }
.lb-nav.next { right: 10px; }
.lb-info { padding: 14px 18px 18px; display: grid; gap: 6px; }
.lb-caption { font-size: 15px; font-weight: 600; }
.lb-meta { font-size: 11.5px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.lb-actions { display: flex; gap: 6px; margin-top: 4px; }

/* ---------------- 时光（留言/日记） ---------------- */
.composer { padding: 16px; display: grid; gap: 10px; }
.composer textarea {
  width: 100%; min-height: 84px; border: 0; background: transparent; resize: vertical;
  font-size: 15px; line-height: 1.7; color: var(--ink); outline: none;
}
.composer textarea::placeholder { color: var(--muted); }
.composer-bar { display: flex; align-items: center; gap: 8px; }
.composer-bar .spacer { flex: 1; }
.mood-toggle { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.mood-toggle .current { font-size: 19px; }

.feed { display: grid; gap: 12px; }
.moment-item { padding: 16px; display: grid; gap: 8px; }
.moment-head { display: flex; align-items: center; gap: 9px; }
.moment-avatar { width: 32px; height: 32px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-deep); font-size: 13px; font-weight: 700; }
.moment-author { font-size: 13px; font-weight: 600; }
.moment-time { font-size: 11px; color: var(--muted); }
.moment-head .mood { margin-left: auto; font-size: 20px; }
.moment-body { font-size: 15px; line-height: 1.8; white-space: pre-wrap; color: var(--ink-soft); }
.moment-photo { border-radius: 14px; overflow: hidden; max-height: 280px; }
.moment-photo img { width: 100%; max-height: 280px; object-fit: cover; }
.moment-foot { display: flex; gap: 8px; align-items: center; font-size: 11.5px; color: var(--muted); }
.moment-foot button { font-size: 11.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 3px; }
.day-divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11.5px; margin: 6px 2px 0; }
.day-divider::before, .day-divider::after { content: ""; height: 1px; background: var(--line); flex: 1; }

/* ---------------- 心愿 ---------------- */
.wish-head { padding: 18px; display: grid; gap: 10px; }
.wish-head .wh-row { display: flex; align-items: flex-end; gap: 8px; }
.wish-head .wh-num { font-family: var(--serif); font-size: 34px; line-height: 1; color: var(--brand-deep); }
.wish-head .wh-num small { font-size: 13px; color: var(--muted); font-family: var(--sans); }
.wish-head .wh-label { font-size: 12px; color: var(--muted); padding-bottom: 4px; }
.progress { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand), var(--accent)); transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.wish-list { display: grid; gap: 10px; }
.wish-card { display: flex; align-items: flex-start; gap: 12px; padding: 14px 15px; }
.wish-check {
  width: 24px; height: 24px; border-radius: 8px; flex: none; margin-top: 2px;
  border: 1.5px solid var(--line); display: grid; place-items: center; color: transparent;
  background: var(--card-soft); transition: all 0.2s ease;
}
.wish-check .icon { width: 15px; height: 15px; }
.wish-card.done .wish-check { background: var(--ok); border-color: var(--ok); color: #fff; }
.wish-main { flex: 1; min-width: 0; }
.wish-title { font-size: 14.5px; font-weight: 600; }
.wish-card.done .wish-title { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 50%, transparent); }
.wish-note { font-size: 12px; color: var(--muted); margin-top: 2px; }
.wish-meta { display: flex; gap: 10px; font-size: 10.5px; color: var(--muted); margin-top: 5px; }
.wish-card .icon-btn { width: 28px; height: 28px; background: transparent; border: 0; color: var(--muted); }
.wish-card .icon-btn .icon { width: 15px; height: 15px; }
.wish-card.done { background: var(--card-soft); }
.wish-add { display: flex; gap: 8px; }
.wish-add input { flex: 1; }

/* ---------------- 足迹 ---------------- */
.map-card { position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card-soft); }
#map { height: 260px; width: 100%; background: var(--card-soft); }
@media (min-width: 980px) { #map { height: 340px; } }
.map-fallback { padding: 30px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.map-stat {
  position: absolute; left: 12px; bottom: 12px; z-index: 400;
  display: flex; gap: 12px;
  padding: 8px 14px; border-radius: 14px;
  background: color-mix(in srgb, var(--card) 90%, transparent);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
  font-size: 11.5px; color: var(--muted);
}
.map-stat b { color: var(--ink); font-family: var(--serif); font-size: 16px; margin-right: 2px; }
.place-list { display: grid; gap: 10px; }
.place-card { display: flex; gap: 12px; padding: 12px; align-items: center; }
.place-thumb { width: 62px; height: 62px; border-radius: 15px; object-fit: cover; flex: none; background: var(--card-soft); display: grid; place-items: center; color: var(--muted); }
.place-thumb .icon { width: 24px; height: 24px; }
.place-main { flex: 1; min-width: 0; }
.place-name { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.place-name .city { font-size: 11px; color: var(--muted); font-weight: 400; }
.place-note { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.place-meta { display: flex; gap: 10px; font-size: 10.5px; color: var(--muted); margin-top: 5px; }
.place-actions { display: flex; flex-direction: column; gap: 4px; }
.place-actions .icon-btn { width: 28px; height: 28px; border: 0; background: transparent; color: var(--muted); }
.place-actions .icon-btn .icon { width: 15px; height: 15px; }

.leaflet-container { font-family: var(--sans) !important; border-radius: var(--radius); }
.leaflet-bar a { color: #333 !important; }
.map-pin-dot { width: 16px; height: 16px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--brand); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); }

/* ---------------- 设置 ---------------- */
.settings-group { display: grid; gap: 2px; overflow: hidden; }
.settings-group .card-pad { display: grid; gap: 2px; }
.setting-row { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: 0; }
.setting-row .sr-main { flex: 1; min-width: 0; }
.setting-row .sr-title { font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 7px; }
.setting-row .sr-desc { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.setting-row .sr-action { font-size: 12.5px; color: var(--brand-deep); display: flex; align-items: center; gap: 2px; }
.setting-row .sr-action .icon { width: 15px; height: 15px; }
.settings-title { font-size: 12px; letter-spacing: 0.14em; color: var(--muted); font-weight: 600; padding: 6px 4px 2px; }
.member-row { display: flex; align-items: center; gap: 10px; padding: 9px 2px; }
.member-avatar { width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; background: var(--brand-soft); font-size: 17px; }
.member-name { font-size: 14px; font-weight: 600; }
.member-role { font-size: 11px; color: var(--muted); }
.invite-box { display: grid; gap: 8px; padding: 14px; border-radius: 16px; background: var(--brand-soft); }
.invite-box .code-line { display: flex; align-items: center; gap: 10px; }
.invite-box .code { flex: 1; font-family: ui-monospace, Menlo, monospace; font-size: 22px; letter-spacing: 0.18em; font-weight: 700; color: var(--brand-deep); }
.theme-row { display: flex; gap: 10px; padding: 6px 0; }
.theme-swatch {
  flex: 1; height: 54px; border-radius: 14px; border: 2px solid var(--line);
  display: grid; place-items: end center; padding-bottom: 5px;
  font-size: 10.5px; color: var(--muted);
  background: var(--swatch, var(--card-soft));
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.theme-swatch.active { border-color: var(--brand); transform: translateY(-2px); }
.theme-swatch.rose { --swatch: linear-gradient(140deg, #ffe4ea, #f3ecfb); }
.theme-swatch.cream { --swatch: linear-gradient(140deg, #fbe7d6, #eef2e6); }
.theme-swatch.night { --swatch: linear-gradient(140deg, #2a222f, #3a2330); color: #cbb6c1; }
.setting-danger { color: var(--danger); }
.settings-version { text-align: center; font-size: 11px; color: var(--muted); padding: 6px 0 20px; }
.about-lines { display: grid; gap: 6px; font-size: 12px; color: var(--muted); }

/* ---------------- 滚动条 ---------------- */
@media (min-width: 980px) {
  ::-webkit-scrollbar { width: 10px; }
  ::-webkit-scrollbar-thumb { background: var(--line); border-radius: 10px; border: 3px solid var(--bg); }
}

/* ---------------- 其它 ---------------- */
.form-error { color: var(--danger); font-size: 12px; min-height: 16px; }
.text-center { text-align: center; }
.mt-2 { margin-top: 8px; }
.pb-safe { padding-bottom: var(--safe-bottom); }
.rotate-180 { transform: rotate(180deg); }
.tag-line { display: flex; flex-wrap: wrap; gap: 6px; }
