/* ==========================================================
   小时光 · 我们的回忆册
   暖粉 / 玻璃拟态 / 手账感
   ========================================================== */

:root {
  --bg: #fffaf7;
  --card: rgba(255, 255, 255, 0.74);
  --card-solid: #fffdfb;
  --rose: #e5796d;
  --rose-deep: #c9514a;
  --rose-soft: #f6b2a7;
  --peach: #f3c3a4;
  --sand: #e9c98f;
  --ink: #45302e;
  --ink-2: #6d5450;
  --muted: #a68c87;
  --line: rgba(214, 160, 150, 0.24);
  --shadow-sm: 0 8px 20px -14px rgba(176, 104, 94, 0.5);
  --shadow: 0 16px 34px -22px rgba(180, 110, 100, 0.5);
  --shadow-lg: 0 30px 60px -34px rgba(170, 96, 86, 0.55);
  --serif: Georgia, "Times New Roman", "Songti SC", "STSong", serif;
  --r-lg: 26px;
  --r-md: 20px;
  --r-sm: 14px;
}

* { box-sizing: border-box; }

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

body {
  font-family: -apple-system, "Segoe UI Variable Text", "Segoe UI", "PingFang SC",
    "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 620px at 6% -12%, #ffe1d8 0%, rgba(255, 225, 216, 0) 62%),
    radial-gradient(900px 520px at 104% -6%, #ffeedd 0%, rgba(255, 238, 221, 0) 58%),
    radial-gradient(820px 640px at 50% 116%, #ffeef1 0%, rgba(255, 238, 241, 0) 62%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  line-height: 1.62;
  overflow-x: hidden;
}

::selection { background: rgba(229, 121, 109, 0.22); }

button, input, textarea { font-family: inherit; color: inherit; }
button { cursor: pointer; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(214, 160, 150, 0.45); border-radius: 99px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------- 背景装饰 ---------------- */
.decor { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }

.blob { position: absolute; border-radius: 50%; filter: blur(46px); opacity: 0.55; }
.blob-1 { width: 420px; height: 420px; left: -140px; top: -120px; background: #ffd6cb; }
.blob-2 { width: 380px; height: 380px; right: -120px; top: 18%; background: #ffe4c9; }
.blob-3 { width: 460px; height: 460px; left: 34%; bottom: -220px; background: #ffe0e6; }

.heart {
  position: absolute;
  color: #e8907f;
  opacity: 0.16;
  font-size: 18px;
  animation: floatUp linear infinite;
}
.heart.h1 { left: 8%; bottom: -4%; font-size: 22px; animation-duration: 19s; }
.heart.h2 { left: 27%; bottom: -8%; font-size: 14px; animation-duration: 26s; animation-delay: -6s; }
.heart.h3 { left: 63%; bottom: -6%; font-size: 26px; animation-duration: 23s; animation-delay: -12s; opacity: 0.12; }
.heart.h4 { left: 86%; bottom: -4%; font-size: 16px; animation-duration: 30s; animation-delay: -3s; }

@keyframes floatUp {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0; }
  12%  { opacity: 0.18; }
  80%  { opacity: 0.14; }
  100% { transform: translateY(-118vh) rotate(24deg); opacity: 0; }
}

/* ---------------- 布局 ---------------- */
.app {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 26px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 22px 26px 40px;
}

/* ---------------- 侧边栏 ---------------- */
.sidebar {
  position: sticky;
  top: 22px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 22px;
  height: calc(100vh - 44px);
  padding: 22px 16px 18px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand { display: flex; align-items: center; gap: 11px; padding: 2px 6px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(140deg, #f09484, #d9605a);
  box-shadow: 0 12px 22px -12px rgba(203, 90, 78, 0.9);
  flex: 0 0 auto;
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: 0.06em; color: #8a4a44; }
.brand-sub { font-size: 11px; color: var(--muted); letter-spacing: 0.16em; margin-top: -1px; }
.brand.small .brand-mark { width: 34px; height: 34px; border-radius: 12px; }
.brand.small .brand-name { font-size: 15px; }

.nav { display: flex; flex-direction: column; gap: 5px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 13px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-align: left;
  transition: background 0.22s, color 0.22s, transform 0.18s;
}
.nav-item svg { width: 19px; height: 19px; opacity: 0.85; flex: 0 0 auto; }
.nav-item:hover { background: rgba(255, 255, 255, 0.85); color: var(--rose-deep); }
.nav-item:active { transform: scale(0.985); }
.nav-item.is-active {
  color: #fff;
  background: linear-gradient(135deg, #f09484, #dd6a5d);
  box-shadow: 0 14px 26px -16px rgba(205, 88, 76, 0.95);
}
.nav-item.is-active svg { opacity: 1; }

.side-card {
  margin-top: auto;
  padding: 16px 16px 14px;
  border-radius: 20px;
  background: linear-gradient(150deg, #ffeae2, #fff6ef);
  border: 1px solid rgba(255, 255, 255, 0.9);
}
.side-label { font-size: 10.5px; letter-spacing: 0.2em; color: #bb8b81; }
.side-days {
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1.15;
  color: #bf4f47;
  font-variant-numeric: tabular-nums;
}
.side-days i { font-style: normal; font-size: 12px; color: #bb8b81; margin-left: 5px; letter-spacing: 0.12em; }
.side-days.is-empty { color: #d3a49b; font-size: 24px; letter-spacing: 0.2em; }
.side-days.is-empty i { display: none; }
.side-names { font-size: 11.5px; color: #a87a71; margin-top: 2px; letter-spacing: 0.05em; }

/* ---------------- 主区 ---------------- */
.main { min-width: 0; padding-bottom: 20px; }

.topbar { display: none; }

.view { display: none; }
.view.is-active { display: block; animation: viewIn 0.5s cubic-bezier(0.22, 0.8, 0.3, 1) both; }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ---------------- 首页 Hero ---------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 28px 32px 26px;
  border-radius: 30px;
  background: linear-gradient(135deg, #ffdfd5 0%, #ffefe7 46%, #fff8f2 100%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}
.hero-glow {
  position: absolute;
  right: -70px;
  bottom: -150px;
  width: 430px;
  height: 430px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 66%);
  pointer-events: none;
}
.hero-stamp {
  position: absolute;
  right: -12px;
  top: -20px;
  width: 200px;
  height: 200px;
  color: #fff;
  opacity: 0.42;
  transform: rotate(12deg);
  pointer-events: none;
}
.hero-head { position: relative; display: flex; justify-content: space-between; align-items: flex-start; }
.hero-greet { font-size: 19px; font-weight: 600; color: #8f4b44; letter-spacing: 0.04em; }
.hero-date { font-size: 12.5px; color: #b58a82; margin-top: 3px; letter-spacing: 0.06em; }

.hero-mid { position: relative; margin: 20px 0 4px; }
.hero-label { font-size: 11px; letter-spacing: 0.24em; color: #b87b71; }
.hero-days {
  font-family: var(--serif);
  font-size: clamp(52px, 7.4vw, 84px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: #b8403a;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  gap: 9px;
}
.hero-days i { font-style: normal; font-size: 15px; color: #b87b71; letter-spacing: 0.16em; }
.hero-days.is-empty { font-size: 46px; color: #d9a89e; letter-spacing: 0.2em; padding-bottom: 6px; }
.hero-days.is-empty i { display: none; }
.hero-since {
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: none;
  font-size: 12.5px;
  color: #a8726a;
  border-bottom: 1px dashed rgba(168, 114, 106, 0.5);
  padding-bottom: 1px;
  letter-spacing: 0.03em;
  transition: color 0.2s;
}
.hero-since:hover { color: var(--rose-deep); }
.hero-actions { position: relative; display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: transform 0.18s, box-shadow 0.22s, background 0.22s, color 0.2s;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; flex: 0 0 auto; }
.btn:active { transform: scale(0.97); }

.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, #ef8b7d, #de6a5c);
  box-shadow: 0 14px 26px -14px rgba(212, 92, 78, 0.95);
}
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 18px 30px -14px rgba(212, 92, 78, 1); }

.btn.ghost { color: #8c5b53; background: rgba(255, 255, 255, 0.8); border-color: rgba(226, 180, 171, 0.5); }
.btn.ghost:hover { background: #fff; border-color: rgba(214, 150, 140, 0.7); }

.btn.danger { color: #fff; background: linear-gradient(135deg, #dd7a72, #c2504a); box-shadow: 0 14px 26px -14px rgba(180, 60, 55, 0.8); }
.btn.danger.ghost { color: #bf5a52; background: rgba(255, 255, 255, 0.8); border-color: rgba(219, 150, 143, 0.55); box-shadow: none; }
.btn.danger.ghost:hover { background: #fff4f2; }

.btn.on-hero {
  color: #9c4f47;
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 20px -16px rgba(150, 70, 60, 0.9);
  font-size: 13px;
  padding: 9px 16px;
}
.btn.on-hero svg { width: 15px; height: 15px; }
.btn.on-hero:hover { background: #fff; transform: translateY(-1px); }

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(226, 180, 171, 0.5);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  color: #9c655d;
  font-size: 20px;
  line-height: 1;
  transition: background 0.2s, transform 0.16s;
}
.icon-btn:hover { background: #fff; }
.icon-btn:active { transform: scale(0.95); }
.icon-btn svg { width: 19px; height: 19px; }

.link {
  border: 0;
  background: none;
  padding: 4px 2px;
  font-size: 12.5px;
  color: #b0796f;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
.link:hover { color: var(--rose-deep); }

/* ---------------- 卡片 / 统计 ---------------- */
.card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: var(--r-md);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.stat-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.stat {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px 18px;
  text-align: left;
  overflow: hidden;
  transition: transform 0.26s cubic-bezier(0.22, 0.8, 0.3, 1), box-shadow 0.26s;
}
button.stat { border: 1px solid rgba(255, 255, 255, 0.88); }
.stat:hover { transform: translateY(-3px); box-shadow: 0 22px 40px -26px rgba(180, 110, 100, 0.7); }
.stat.plain { cursor: default; }
.stat.plain:hover { transform: none; box-shadow: var(--shadow); }

.stat-ico {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 15px;
  font-size: 20px;
  flex: 0 0 auto;
}
.stat-ico.rose { background: linear-gradient(150deg, #ffe0da, #ffd0c8); }
.stat-ico.peach { background: linear-gradient(150deg, #ffe9d8, #ffdcc2); }
.stat-ico.sand { background: linear-gradient(150deg, #fdf0d8, #f7e3c1); }

.stat-body { min-width: 0; flex: 1 1 auto; }
.stat-label { font-size: 11px; letter-spacing: 0.12em; color: var(--muted); }
.stat-value {
  font-size: 17px;
  font-weight: 600;
  color: #6b443f;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat-sub { font-size: 11.5px; color: #b58f88; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------- 区块标题 ---------------- */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 30px 2px 12px;
}
.section-head h2 {
  position: relative;
  margin: 0;
  padding-left: 14px;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #7d4d47;
}
.section-head h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 15px;
  border-radius: 99px;
  background: linear-gradient(180deg, #f09484, #dd6a5d);
}

/* ---------------- 首页：照片横条 ---------------- */
.strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scroll-snap-type: x proximity;
}
.strip::-webkit-scrollbar { height: 6px; }

.strip-item {
  position: relative;
  flex: 0 0 auto;
  width: 168px;
  height: 168px;
  border: 0;
  padding: 0;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(140deg, #ffe6de, #fff3ec);
  box-shadow: var(--shadow-sm);
  scroll-snap-align: start;
  transition: transform 0.28s cubic-bezier(0.22, 0.8, 0.3, 1), box-shadow 0.28s;
}
.strip-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s; }
.strip-item:hover { transform: translateY(-4px); box-shadow: 0 20px 34px -20px rgba(180, 100, 90, 0.75); }
.strip-item:hover img { transform: scale(1.06); }
.strip-item .strip-date {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 10.5px;
  color: #fff;
  background: rgba(70, 40, 36, 0.42);
  backdrop-filter: blur(6px);
}

.strip-add {
  display: grid;
  place-items: center;
  gap: 4px;
  color: #b0796f;
  font-size: 11.5px;
  background: rgba(255, 255, 255, 0.6);
  border: 1.5px dashed rgba(226, 176, 166, 0.85);
  box-shadow: none;
}
.strip-add span.plus { font-size: 26px; line-height: 1; color: #dc8b7f; }
.strip-add:hover { background: rgba(255, 255, 255, 0.95); }

.strip-empty {
  width: 100%;
  padding: 26px 18px;
  border-radius: var(--r-md);
  border: 1.5px dashed rgba(226, 176, 166, 0.7);
  background: rgba(255, 255, 255, 0.45);
  text-align: center;
  color: #b58f88;
  font-size: 13px;
}

/* ---------------- 迷你列表（首页/姨妈历史） ---------------- */
.mini-list { display: flex; flex-direction: column; gap: 9px; }
.mini-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 17px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
}
.mini-ico {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: linear-gradient(150deg, #ffe3dc, #ffd4cb);
  font-size: 17px;
  flex: 0 0 auto;
}
.mini-main { min-width: 0; flex: 1; }
.mini-title { font-size: 13.5px; font-weight: 600; color: #6b443f; }
.mini-sub { font-size: 11.5px; color: #b58f88; margin-top: 1px; }
.mini-right { text-align: right; flex: 0 0 auto; }
.mini-num { font-family: var(--serif); font-size: 20px; color: #c0504a; line-height: 1.1; font-variant-numeric: tabular-nums; }
.mini-unit { font-size: 10px; color: #bb8b81; letter-spacing: 0.08em; }
.mini-del {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #c9a29a;
  font-size: 15px;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s;
}
.mini-item:hover .mini-del { opacity: 1; }
.mini-del:hover { background: rgba(255, 226, 221, 0.9); color: #c0504a; }

/* ---------------- 页头 ---------------- */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin: 6px 2px 18px;
  flex-wrap: wrap;
}
.page-head h1 {
  margin: 0;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #6f403b;
}
.page-sub { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); letter-spacing: 0.04em; }

/* ---------------- 回忆墙面 ---------------- */
.gallery {
  column-count: 4;
  column-gap: 13px;
  margin-top: 4px;
}
.g-item {
  position: relative;
  display: block;
  width: 100%;
  margin: 0 0 13px;
  padding: 0;
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(140deg, #ffe8e0, #fff4ee);
  box-shadow: var(--shadow-sm);
  break-inside: avoid;
  transition: transform 0.3s cubic-bezier(0.22, 0.8, 0.3, 1), box-shadow 0.3s;
  cursor: zoom-in;
}
.g-item img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.45s cubic-bezier(0.22, 0.8, 0.3, 1);
}
.g-item:hover { transform: translateY(-4px); box-shadow: 0 24px 40px -24px rgba(180, 100, 90, 0.8); }
.g-item:hover img { transform: scale(1.045); }
.g-info {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 22px 12px 10px;
  background: linear-gradient(to top, rgba(58, 32, 29, 0.62), rgba(58, 32, 29, 0));
  color: #fff;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s, transform 0.3s;
  text-align: left;
}
.g-item:hover .g-info { opacity: 1; transform: none; }
.g-date { font-size: 10.5px; letter-spacing: 0.08em; opacity: 0.9; }
.g-cap { font-size: 12px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.drop-hint {
  display: none;
  margin-bottom: 12px;
  padding: 22px;
  border-radius: var(--r-md);
  border: 2px dashed rgba(229, 121, 109, 0.6);
  background: rgba(255, 236, 231, 0.75);
  color: #b0615a;
  text-align: center;
  font-size: 13.5px;
  letter-spacing: 0.05em;
}
body.is-dragging .drop-hint { display: block; }

/* ---------------- 空状态 ---------------- */
.empty {
  display: none;
  padding: 52px 20px;
  text-align: center;
  color: var(--muted);
}
.empty.show { display: block; animation: viewIn 0.45s both; }
.empty-ico { font-size: 40px; opacity: 0.75; margin-bottom: 8px; }
.empty h3 { margin: 0 0 5px; font-size: 15px; font-weight: 600; color: #8a5c55; letter-spacing: 0.05em; }
.empty p { margin: 0; font-size: 12.5px; }

/* ---------------- 日常 ---------------- */
.composer { padding: 16px 18px 15px; }
.composer-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.moods { display: flex; gap: 4px; flex-wrap: wrap; }
.mood-btn {
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  font-size: 17px;
  line-height: 1;
  transition: background 0.18s, transform 0.16s, border-color 0.18s;
  filter: grayscale(0.35);
  opacity: 0.7;
}
.mood-btn:hover { background: rgba(255, 255, 255, 0.9); transform: translateY(-1px); filter: none; opacity: 1; }
.mood-btn.is-on {
  background: linear-gradient(150deg, #ffe3dc, #ffd3c9);
  border-color: rgba(229, 150, 138, 0.55);
  filter: none;
  opacity: 1;
  transform: scale(1.04);
}

.textarea {
  width: 100%;
  margin: 12px 0 10px;
  padding: 12px 14px;
  border: 1px solid rgba(226, 180, 171, 0.45);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  line-height: 1.75;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.textarea::placeholder { color: #c4a9a3; }
.textarea:focus {
  background: #fff;
  border-color: rgba(229, 121, 109, 0.6);
  box-shadow: 0 0 0 4px rgba(229, 121, 109, 0.1);
}

.composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hint { font-size: 11.5px; color: #bd9b94; letter-spacing: 0.03em; }

.notes { display: flex; flex-direction: column; gap: 11px; margin-top: 16px; }
.note {
  position: relative;
  padding: 16px 18px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
  transition: transform 0.24s, box-shadow 0.24s;
  animation: viewIn 0.4s both;
}
.note:hover { transform: translateY(-2px); box-shadow: 0 20px 34px -24px rgba(180, 110, 100, 0.6); }
.note-head { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.note-date { font-size: 11.5px; color: #b0796f; letter-spacing: 0.1em; font-weight: 600; }
.note-mood { font-size: 16px; line-height: 1; }
.note-text { font-size: 14px; line-height: 1.8; color: #5d403c; white-space: pre-wrap; word-break: break-word; }
.note-del {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #c9a29a;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s;
}
.note:hover .note-del { opacity: 1; }
.note-del:hover { background: rgba(255, 226, 221, 0.9); color: #c0504a; }

/* ---------------- 表单控件 ---------------- */
.input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid rgba(226, 180, 171, 0.5);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.85);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.input:focus { background: #fff; border-color: rgba(229, 121, 109, 0.6); box-shadow: 0 0 0 4px rgba(229, 121, 109, 0.1); }
.input.date { width: auto; min-width: 148px; color: #7d4d47; }
input[type="date"]::-webkit-calendar-picker-indicator { opacity: 0.5; cursor: pointer; }

.form-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.form-row label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: #a5807a;
}
.form-row label.grow { flex: 1 1 180px; min-width: 140px; }
.form-row label.check {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding-top: 20px;
  font-size: 13px;
  letter-spacing: 0;
  color: #7d5a54;
  cursor: pointer;
}
.form-row label.check input { width: 16px; height: 16px; accent-color: #e5796d; cursor: pointer; }
.form-actions { display: flex; gap: 9px; justify-content: flex-end; flex-wrap: wrap; }
.form-actions.left { justify-content: flex-start; }

.period-form, .anniv-form { padding: 18px 20px; margin-bottom: 18px; }
.period-form[hidden], .anniv-form[hidden] { display: none; }

/* ---------------- 姨妈日历 ---------------- */
.period-body {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-top: 16px;
}
.period-body .section-head { margin-top: 0; }
.cal-card { padding: 18px 20px 14px; max-width: 520px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-title { font-family: var(--serif); font-size: 19px; color: #7d4d47; letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }
.cal-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 6px; }
.cal-week span { text-align: center; font-size: 11px; color: #bb9b94; letter-spacing: 0.08em; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }

.cal-day {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  border-radius: 13px;
  font-size: 13px;
  color: #6d5450;
  font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid transparent;
  transition: background 0.2s, color 0.2s, transform 0.18s;
}
.cal-day.blank { background: transparent; }
.cal-day.is-out { color: #d3bdb7; background: transparent; }
.cal-day.is-period {
  color: #fff;
  font-weight: 600;
  background: linear-gradient(140deg, #f4a294, #e57f6f);
  box-shadow: 0 8px 16px -10px rgba(214, 100, 86, 0.9);
}
.cal-day.is-start::after {
  content: "";
  position: absolute;
  bottom: 6px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
}
.cal-day.is-pred {
  color: #c98a80;
  border: 1.5px dashed rgba(229, 140, 128, 0.75);
  background: rgba(255, 240, 236, 0.6);
}
.cal-day.is-today { box-shadow: inset 0 0 0 2px rgba(224, 112, 95, 0.85); }
.cal-day.is-today.is-period { box-shadow: 0 8px 16px -10px rgba(214, 100, 86, 0.9), inset 0 0 0 2px rgba(255, 255, 255, 0.9); }
.cal-day:not(.blank):hover { transform: translateY(-1px); }

.cal-legend { display: flex; gap: 16px; padding: 12px 4px 2px; font-size: 11.5px; color: #a5807a; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.period { background: linear-gradient(140deg, #f4a294, #e57f6f); }
.dot.predict { border: 1.5px dashed rgba(229, 140, 128, 0.85); background: rgba(255, 240, 236, 0.7); }
.dot.today { box-shadow: inset 0 0 0 2px rgba(224, 112, 95, 0.85); background: #fff; }

/* ---------------- 纪念日 ---------------- */
.anniv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 13px;
}
.anniv-card {
  position: relative;
  overflow: hidden;
  padding: 18px 18px 16px;
  border-radius: var(--r-md);
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: linear-gradient(155deg, #fff3ec, #ffe7de);
  box-shadow: var(--shadow-sm);
  transition: transform 0.26s, box-shadow 0.26s;
}
.anniv-card:nth-child(3n + 2) { background: linear-gradient(155deg, #fff6ea, #ffe9d3); }
.anniv-card:nth-child(3n + 3) { background: linear-gradient(155deg, #fdf4f6, #ffe3e6); }
.anniv-card:hover { transform: translateY(-3px); box-shadow: 0 22px 38px -24px rgba(180, 110, 100, 0.7); }
.anniv-emoji { font-size: 22px; line-height: 1; }
.anniv-name { margin: 8px 0 2px; font-size: 14.5px; font-weight: 600; color: #7d4d47; letter-spacing: 0.03em; }
.anniv-date { font-size: 11.5px; color: #a5807a; letter-spacing: 0.06em; }
.anniv-big { display: flex; align-items: baseline; gap: 6px; margin-top: 12px; }
.anniv-num { font-family: var(--serif); font-size: 34px; line-height: 1; color: #bf4f47; font-variant-numeric: tabular-nums; }
.anniv-unit { font-size: 11px; color: #b58f88; letter-spacing: 0.1em; }
.anniv-note { margin-top: 8px; font-size: 11.5px; color: #a5807a; border-top: 1px dashed rgba(214, 160, 150, 0.4); padding-top: 7px; }
.anniv-card.is-today { background: linear-gradient(155deg, #ffd9cf, #ffc9be); box-shadow: 0 18px 34px -20px rgba(205, 90, 78, 0.8); }
.anniv-card.is-today .anniv-num { color: #a83a35; }
.anniv-card .card-del {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  color: #b58f88;
  font-size: 14px;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s;
}
.anniv-card:hover .card-del { opacity: 1; }
.anniv-card .card-del:hover { background: #fff; color: #c0504a; }

/* ---------------- 云同步面板 ---------------- */
.cloud-status { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.cs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.9);
  font-size: 13px;
}
.cs-row span { color: var(--muted); letter-spacing: 0.06em; flex: 0 0 auto; }
.cs-row b { color: #6b443f; font-weight: 600; text-align: right; word-break: break-all; }

/* ---------------- 设置面板 ---------------- */
.panel { padding: 18px 20px; margin-bottom: 14px; }
.panel-title { margin: 0 0 13px; font-size: 14px; font-weight: 600; letter-spacing: 0.08em; color: #7d4d47; }
.about { text-align: center; font-size: 11.5px; color: #c0a49d; letter-spacing: 0.1em; margin: 26px 0 8px; }

/* ---------------- 大图查看 ---------------- */
.lb {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 22px;
}
.lb[hidden] { display: none; }
.lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(56, 32, 29, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: fadeIn 0.25s both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.lb-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(1000px, 100%);
  max-height: 100%;
  animation: lbIn 0.32s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}
@keyframes lbIn { from { opacity: 0; transform: scale(0.97) translateY(10px); } to { opacity: 1; transform: none; } }

.lb-figure { position: relative; display: flex; align-items: center; justify-content: center; }
.lb-figure img {
  max-width: 100%;
  max-height: 68vh;
  border-radius: 18px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
  background: #fff;
  display: block;
}
.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  color: #8c5b53;
  font-size: 22px;
  line-height: 1;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 22px -12px rgba(0, 0, 0, 0.5);
  transition: background 0.2s, transform 0.18s;
}
.lb-nav:hover { background: #fff; }
.lb-nav.prev { left: 8px; }
.lb-nav.next { right: 8px; }

.lb-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 253, 251, 0.96);
  box-shadow: 0 20px 40px -24px rgba(0, 0, 0, 0.5);
}
.lb-meta { display: flex; align-items: center; gap: 10px; }
.lb-count { font-size: 11.5px; color: #b58f88; letter-spacing: 0.06em; }
.lb-caption {
  flex: 1 1 220px;
  min-height: 40px;
  max-height: 96px;
  padding: 9px 12px;
  border: 1px solid rgba(226, 180, 171, 0.5);
  border-radius: 11px;
  background: #fff;
  font-size: 13.5px;
  line-height: 1.6;
  resize: none;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.lb-caption:focus { border-color: rgba(229, 121, 109, 0.6); box-shadow: 0 0 0 4px rgba(229, 121, 109, 0.1); }
.lb-actions { display: flex; gap: 8px; margin-left: auto; }
.lb-actions .btn { padding: 8px 15px; font-size: 12.5px; }

/* ---------------- 底部导航 ---------------- */
.bottom-nav { display: none; }

/* ---------------- 提示条 ---------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  z-index: 120;
  transform: translate(-50%, 20px);
  padding: 11px 20px;
  border-radius: 999px;
  background: rgba(64, 38, 35, 0.92);
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.03em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  backdrop-filter: blur(8px);
  max-width: 86vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 处理中遮罩 */
.busy { position: relative; pointer-events: none; opacity: 0.6; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1120px) {
  .gallery { column-count: 3; }
}

@media (max-width: 900px) {
  .app {
    grid-template-columns: minmax(0, 1fr);
    padding: 14px 15px 108px;
    gap: 0;
  }
  .sidebar { display: none; }
  .topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
  }
  .bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    justify-content: space-around;
    padding: 7px 6px calc(7px + env(safe-area-inset-bottom));
    background: rgba(255, 253, 251, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 -14px 34px -22px rgba(170, 100, 90, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }
  .bn-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex: 1;
    padding: 4px 2px;
    border: 0;
    background: none;
    color: #a68c87;
    font-size: 10px;
    letter-spacing: 0.06em;
    transition: color 0.2s;
  }
  .bn-item svg { width: 21px; height: 21px; }
  .bn-item.is-active { color: var(--rose-deep); }
  .bn-item.is-active svg { filter: drop-shadow(0 4px 8px rgba(220, 110, 95, 0.45)); }

  .hero { padding: 22px 22px 20px; border-radius: 26px; }
  .hero-stamp { width: 150px; height: 150px; }
  .stat-grid, .stat-grid.three { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .stat { padding: 14px 16px; }
  .page-head h1 { font-size: 23px; }
  .mini-del, .note-del, .anniv-card .card-del { opacity: 1; }
}

@media (max-width: 900px) {
  .period-body { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .cal-card { max-width: none; }
}

@media (max-width: 640px) {
  .gallery { column-count: 2; column-gap: 9px; }
  .g-item { margin-bottom: 9px; border-radius: 15px; }
  .strip-item { width: 132px; height: 132px; }
  .hero-days { font-size: 58px; }
  .lb-figure img { max-height: 56vh; }
  .lb-panel { padding: 10px; }
  .lb-actions { width: 100%; margin-left: 0; }
  .lb-actions .btn { flex: 1; }
  .toast { bottom: 96px; }
  .cal-day { border-radius: 11px; font-size: 12.5px; }
}

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