:root {
  --pink: #ff7aa2;
  --pink-deep: #f0577f;
  --pink-soft: #ffe3ec;
  --pink-mist: #fff0f5;
  --peach: #ffb39c;
  --bg: #fff6f9;
  --text: #3d2b33;
  --muted: #a08d96;
  --line: rgba(240, 87, 127, 0.12);
  --glass: rgba(255, 255, 255, 0.72);
  --radius: 22px;
  --shadow: 0 12px 32px -14px rgba(232, 90, 133, 0.38), 0 2px 6px rgba(232, 90, 133, 0.06);
  --shadow-sm: 0 6px 16px -8px rgba(232, 90, 133, 0.35);
  --grad: linear-gradient(135deg, #ffa4c0 0%, #ff7aa2 48%, #ff9a8b 100%);
  --num: ui-rounded, "SF Pro Rounded", -apple-system, "PingFang SC", sans-serif;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
svg.icon { width: 1em; height: 1em; flex: none; display: block; }
.muted { color: var(--muted); }

/* 背景：两团柔和的光晕，固定不随滚动 */
.backdrop {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vmax 40vmax at 0% 0%, rgba(255, 170, 200, 0.55), transparent 70%),
    radial-gradient(50vmax 40vmax at 100% 30%, rgba(255, 196, 176, 0.45), transparent 70%),
    radial-gradient(60vmax 40vmax at 30% 100%, rgba(255, 214, 230, 0.7), transparent 70%),
    var(--bg);
}

/* ---------- 基础控件 ---------- */
input, textarea, button { font: inherit; font-size: 16px; color: inherit; } /* 16px 防止 iOS 聚焦时放大 */
input:not([type="checkbox"]), textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid transparent;
  border-radius: 14px;
  background: var(--pink-mist);
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
input::placeholder, textarea::placeholder { color: #c4b1ba; }
input:focus, textarea:focus {
  background: #fff;
  border-color: rgba(255, 122, 162, 0.55);
  box-shadow: 0 0 0 4px rgba(255, 122, 162, 0.12);
}
input[type="date"] { min-height: 46px; }
textarea { resize: none; }
button { border: 0; background: none; cursor: pointer; padding: 0; }
button:focus, summary:focus, [role="button"]:focus { outline: none; }
button:focus-visible, summary:focus-visible, [role="button"]:focus-visible { outline: 2px solid rgba(255, 122, 162, 0.6); outline-offset: 2px; }
button:disabled { opacity: 0.55; cursor: default; }
.row { display: flex; gap: 10px; align-items: center; }
.row > input { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 10px; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 600;
  transition: transform 0.15s, box-shadow 0.2s;
}
.button:active { transform: scale(0.97); }
.button.primary { background: var(--grad); color: #fff; box-shadow: var(--shadow-sm); }
.button.block { width: 100%; }

.icon-button {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--muted);
  background: var(--glass);
  box-shadow: var(--shadow-sm);
  font-size: 18px;
  transition: transform 0.15s;
}
.icon-button:active { transform: scale(0.92); }
.icon-button.danger { color: #e0405f; }

.round-button {
  width: 46px; height: 46px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-size: 22px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s;
}
.round-button:active { transform: scale(0.9); }

.chip {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--pink-soft);
  color: var(--pink-deep);
  font-size: 12px;
  font-weight: 600;
}

/* 开关 */
.switch { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; white-space: nowrap; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch i {
  position: relative; width: 44px; height: 26px; flex: none;
  border-radius: 999px; background: #eadde2;
  transition: background 0.2s;
}
.switch i::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s;
}
.switch input:checked + i { background: var(--pink); }
.switch input:checked + i::after { transform: translateX(18px); }

/* 头像 */
.avatar {
  display: inline-grid; place-items: center; flex: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  border: 2px solid #fff;
  box-shadow: 0 4px 10px -4px rgba(232, 90, 133, 0.6);
}
.avatar.a { background: linear-gradient(135deg, #ff8fb1, #f0577f); }
.avatar.b { background: linear-gradient(135deg, #ffc3a8, #ff8f8f); }
.avatar.lg { width: 58px; height: 58px; font-size: 22px; border-width: 3px; }

/* ---------- 布局 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: calc(14px + env(safe-area-inset-top)) 20px 12px;
  background: rgba(255, 245, 249, 0.97);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.topbar h1 { font-size: 20px; font-weight: 800; letter-spacing: 0.5px; }
.topbar-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

main {
  max-width: 560px;
  margin: 0 auto;
  padding: 6px 16px calc(110px + env(safe-area-inset-bottom));
}
.tab { display: none; }
.tab.active { display: block; animation: rise 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

.card {
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 16px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-head h2, .wish-summary h2 { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; }
.badge-icon {
  width: 30px; height: 30px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--pink-soft); color: var(--pink-deep);
  font-size: 16px;
}
.section-title { font-size: 14px; color: var(--muted); font-weight: 600; margin: 22px 4px 10px; }

/* 底部悬浮导航 */
.tabbar {
  position: fixed; z-index: 10;
  left: 50%; bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(420px, calc(100% - 32px));
  display: flex; gap: 4px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(1.5) blur(18px);
  -webkit-backdrop-filter: saturate(1.5) blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 34px -12px rgba(232, 90, 133, 0.45);
}
.tabbar button {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 46px;
  border-radius: 999px;
  color: #b9a5ae;
  font-size: 22px;
  transition: background 0.25s, color 0.25s, flex 0.3s;
}
.tabbar em { font-style: normal; font-size: 14px; font-weight: 600; display: none; }
.tabbar button.active { flex: 1.6; background: var(--grad); color: #fff; box-shadow: var(--shadow-sm); }
.tabbar button.active em { display: inline; }

/* ---------- 首页 ---------- */
.hero {
  position: relative; overflow: hidden;
  text-align: center;
  color: #fff;
  background: var(--grad);
  border-radius: 28px;
  padding: 26px 20px 22px;
  margin-bottom: 16px;
  box-shadow: 0 20px 40px -18px rgba(240, 87, 127, 0.7);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(240px 140px at 15% 0%, rgba(255, 255, 255, 0.35), transparent 70%),
    radial-gradient(200px 160px at 100% 100%, rgba(255, 255, 255, 0.18), transparent 70%);
}
.hero > * { position: relative; }
.hero-hearts span {
  position: absolute; bottom: -30px;
  color: rgba(255, 255, 255, 0.35);
  animation: float-up 9s linear infinite;
}
.hero-hearts span:nth-child(1) { left: 6%; font-size: 14px; animation-delay: 0s; }
.hero-hearts span:nth-child(2) { left: 20%; font-size: 22px; animation-delay: 3.5s; }
.hero-hearts span:nth-child(3) { left: 36%; font-size: 12px; animation-delay: 6s; }
.hero-hearts span:nth-child(4) { left: 55%; font-size: 18px; animation-delay: 1.5s; }
.hero-hearts span:nth-child(5) { left: 70%; font-size: 26px; animation-delay: 5s; }
.hero-hearts span:nth-child(6) { left: 84%; font-size: 13px; animation-delay: 2.5s; }
.hero-hearts span:nth-child(7) { left: 93%; font-size: 19px; animation-delay: 7.5s; }
@keyframes float-up {
  0% { transform: translateY(0) rotate(0); opacity: 0; }
  10% { opacity: 1; }
  100% { transform: translateY(-360px) rotate(25deg); opacity: 0; }
}

.hero-couple { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 14px; }
.hero-couple .name { font-size: 13px; opacity: 0.9; margin-top: 4px; }
.hero-couple .person { display: flex; flex-direction: column; align-items: center; }
.hero-couple .avatar { box-shadow: 0 6px 16px -6px rgba(120, 20, 50, 0.5); }
.hero-couple .link {
  font-size: 22px;
  animation: beat 1.6s ease-in-out infinite;
  margin-bottom: 18px;
}
@keyframes beat { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.25); } 24% { transform: scale(1); } 36% { transform: scale(1.15); } }

.hero-label { font-size: 14px; opacity: 0.9; letter-spacing: 2px; }
.hero-days { font-family: var(--num); margin: 2px 0 14px; line-height: 1; }
.hero-days span { font-size: 76px; font-weight: 800; letter-spacing: -1px; text-shadow: 0 6px 20px rgba(150, 20, 60, 0.25); }
.hero-days small { font-size: 18px; margin-left: 6px; opacity: 0.9; }

.hero-clock { display: flex; justify-content: center; gap: 10px; }
.hero-clock .unit {
  min-width: 64px;
  padding: 8px 6px 6px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.hero-clock b { display: block; font-family: var(--num); font-size: 24px; font-variant-numeric: tabular-nums; }
.hero-clock span { font-size: 11px; opacity: 0.85; }

.hero-progress { margin-top: 18px; }
.hero-progress .bar { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.28); overflow: hidden; }
.hero-progress .bar i {
  display: block; height: 100%; width: 0;
  border-radius: inherit;
  background: #fff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.8);
  transition: width 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.hero-progress p { font-size: 12px; margin-top: 8px; opacity: 0.92; }

/* 纪念日 */
.events { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.event {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 12px 10px 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform 0.15s;
}
.event:active { transform: scale(0.985); }
.event .cal {
  width: 52px; flex: none;
  border-radius: 14px; overflow: hidden;
  text-align: center;
  background: #fff;
  box-shadow: 0 4px 10px -6px rgba(232, 90, 133, 0.5);
}
.event .cal .m { display: block; font-size: 11px; font-weight: 600; color: #fff; background: var(--grad); padding: 3px 0; }
.event .cal .d { display: block; font-family: var(--num); font-size: 22px; font-weight: 800; padding: 3px 0 4px; color: var(--pink-deep); }
.event .info { flex: 1; min-width: 0; }
.event .title { font-weight: 600; word-break: break-word; }
.event .sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.event .count { text-align: right; flex: none; }
.event .count b { font-family: var(--num); font-size: 24px; font-weight: 800; color: var(--pink-deep); }
.event .count span { display: block; font-size: 11px; color: var(--muted); }
.event.past { opacity: 0.6; }
.event.past .count b { color: var(--muted); }
.event.today { background: var(--grad); border-color: transparent; color: #fff; box-shadow: var(--shadow-sm); }
.event.today .sub, .event.today .count span { color: rgba(255, 255, 255, 0.85); }
.event.today .count b { color: #fff; font-size: 16px; }
/* 删除按钮平时隐藏，轻点某个纪念日后才出现，避免列表满屏都是 × */
.event .remove {
  position: absolute; top: -7px; right: -7px;
  width: 24px; height: 24px; border-radius: 50%;
  display: none; place-items: center;
  background: #ff6f98; color: #fff; font-size: 13px;
  box-shadow: 0 3px 8px -2px rgba(240, 87, 127, 0.6);
  animation: pop 0.2s;
}
.event.editing .remove { display: grid; }
@keyframes pop { from { transform: scale(0.4); opacity: 0; } }
.events-hint { font-size: 12px; color: var(--muted); text-align: center; margin-top: 10px; }

.adder { margin-top: 14px; }
.adder summary {
  list-style: none;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px;
  border-radius: 16px;
  border: 1.5px dashed rgba(255, 122, 162, 0.45);
  color: var(--pink-deep);
  font-weight: 600;
  cursor: pointer;
}
.adder summary::-webkit-details-marker { display: none; }
.adder[open] summary { border-style: solid; background: var(--pink-mist); }
.adder-form { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; animation: rise 0.25s; }

/* ---------- 照片墙 ---------- */
.field-inline {
  display: flex; align-items: center; gap: 12px;
  padding-left: 14px;
  border-radius: 14px;
  background: var(--pink-mist);
  color: var(--muted); font-size: 14px; white-space: nowrap;
}
.field-inline input { background: transparent; flex: 1; }
.field-inline input:focus { box-shadow: none; border-color: transparent; }

.dropzone {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 20px 16px;
  border-radius: 18px;
  border: 2px dashed rgba(255, 122, 162, 0.45);
  background: linear-gradient(135deg, rgba(255, 228, 238, 0.7), rgba(255, 240, 234, 0.7));
  cursor: pointer;
  transition: transform 0.15s;
}
.dropzone:active { transform: scale(0.98); }
.dropzone-icon {
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--grad); color: #fff; font-size: 22px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 6px;
}
.dropzone-title { font-weight: 700; color: var(--pink-deep); }
.dropzone-sub { font-size: 12px; color: var(--muted); }
.dropzone.busy { pointer-events: none; }
.dropzone-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 122, 162, 0.15); }
.dropzone-progress i { display: block; height: 100%; width: 0; background: var(--grad); transition: width 0.3s; }

.photo-group { margin-bottom: 18px; }
.photo-group h3 { font-size: 14px; font-weight: 700; margin: 4px 4px 10px; display: flex; align-items: baseline; gap: 8px; }
.photo-group h3 span { font-size: 12px; color: var(--muted); font-weight: 500; }
.masonry { display: flex; gap: 10px; align-items: flex-start; }
.masonry-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.photo {
  position: relative;
  display: block;
  cursor: pointer;
  border-radius: 18px; overflow: hidden;
  background: var(--pink-soft);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s;
}
.photo:active { transform: scale(0.98); }
.photo img { display: block; width: 100%; min-height: 80px; object-fit: cover; }
.photo .overlay {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 26px 10px 8px;
  text-align: left;
  color: #fff;
  font-size: 12px;
  background: linear-gradient(to top, rgba(60, 10, 30, 0.6), transparent);
}
.photo .overlay p { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo .overlay span { opacity: 0.85; }

.lightbox {
  position: fixed; inset: 0; z-index: 30;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(40, 14, 26, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: fade 0.2s;
}
@keyframes fade { from { opacity: 0; } }
.lightbox figure { margin: 0; max-width: 100%; display: flex; flex-direction: column; align-items: center; animation: rise 0.3s; }
.lightbox img { max-width: 100%; max-height: 70vh; border-radius: 18px; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.6); }
.lightbox figcaption {
  margin-top: 16px; padding: 14px 18px; min-width: 220px;
  text-align: center; color: #fff;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.lightbox .caption { font-size: 16px; font-weight: 600; }
.lightbox .caption:empty { display: none; }
.lightbox .meta { font-size: 12px; opacity: 0.7; margin-top: 4px; }
.lightbox-close { position: absolute; top: calc(16px + env(safe-area-inset-top)); right: 16px; background: rgba(255, 255, 255, 0.16); color: #fff; box-shadow: none; }
.lightbox-delete {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 12px; padding: 7px 14px;
  border-radius: 999px;
  color: #ffd0da; font-size: 13px;
  background: rgba(255, 90, 120, 0.2);
}

/* 上传方式切换：一张 / 一组 */
.segmented {
  position: relative;
  display: flex;
  padding: 4px;
  margin-bottom: 12px;
  border-radius: 14px;
  background: var(--pink-mist);
}
.segmented button {
  flex: 1;
  padding: 9px 0;
  border-radius: 11px;
  color: var(--muted);
  font-size: 14px; font-weight: 600;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.segmented button.active { background: #fff; color: var(--pink-deep); box-shadow: 0 3px 10px -4px rgba(232, 90, 133, 0.45); }

/* 照片墙里的一组：封面 + 后面叠两层卡片 */
.album-stack { position: relative; padding-top: 9px; isolation: isolate; }
.album-stack::before, .album-stack::after {
  content: ""; position: absolute; z-index: -1;
  height: 60px; border-radius: 16px;
}
.album-stack::before { top: 0; left: 14px; right: 14px; background: #ffd3e0; }
.album-stack::after { top: 4px; left: 7px; right: 7px; background: #ffb9cd; }
.album-badge {
  position: absolute; top: 8px; right: 8px; z-index: 1;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(40, 14, 26, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff; font-size: 12px; font-weight: 600;
}
.photo .overlay .album-name { font-size: 14px; }

/* 一组照片的详情页 */
.album-view {
  position: fixed; inset: 0; z-index: 25;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg);
  animation: slide-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.album-view::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(60vmax 40vmax at 0% 0%, rgba(255, 170, 200, 0.5), transparent 70%),
    radial-gradient(50vmax 40vmax at 100% 30%, rgba(255, 196, 176, 0.4), transparent 70%);
}
@keyframes slide-in { from { opacity: 0; transform: translateX(30px); } }
.album-head {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
  background: rgba(255, 245, 249, 0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.album-head-text { flex: 1; min-width: 0; }
.album-head h2 { font-size: 18px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.album-head p { font-size: 12px; color: var(--muted); margin-top: 2px; }
.album-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  max-width: 560px;
  margin: 0 auto;
  padding: 6px 12px calc(30px + env(safe-area-inset-bottom));
}
.album-grid .cell {
  aspect-ratio: 1;
  border-radius: 12px; overflow: hidden;
  background: var(--pink-soft);
  cursor: pointer;
  animation: rise 0.3s both;
}
.album-grid .cell:first-child { grid-column: span 2; grid-row: span 2; border-radius: 18px; }
.album-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 大图左右切换 */
.lightbox-nav {
  position: absolute; top: 50%; z-index: 1;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.16); color: #fff; box-shadow: none;
}
.lightbox-nav:active { transform: translateY(-50%) scale(0.92); }
.lightbox-nav.prev { left: 10px; }
.lightbox-nav.next { right: 10px; }
.lightbox .meta .count { margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.18); }

/* ---------- 留言板 ---------- */
.composer {
  display: flex; align-items: flex-end; gap: 10px;
  padding: 10px;
  margin-bottom: 18px;
  border-radius: 24px;
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow);
}
.composer .avatar { margin-bottom: 5px; }
.composer textarea { flex: 1; min-height: 46px; max-height: 160px; padding: 12px 14px; line-height: 1.45; border-radius: 18px; }
.composer .send {
  width: 46px; height: 46px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--grad); color: #fff; font-size: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s;
}
.composer .send:active { transform: scale(0.9); }

.day-sep { display: flex; align-items: center; gap: 10px; margin: 18px 0 12px; color: var(--muted); font-size: 12px; }
.day-sep::before, .day-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.day-sep span { padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.7); }

.msg { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 14px; animation: rise 0.3s; }
.msg.mine { flex-direction: row-reverse; }
.msg .body { max-width: 76%; display: flex; flex-direction: column; align-items: flex-start; }
.msg.mine .body { align-items: flex-end; }
.msg .bubble {
  padding: 11px 15px;
  border-radius: 20px 20px 20px 6px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.msg.mine .bubble { background: var(--grad); color: #fff; border-radius: 20px 20px 6px 20px; }
.msg .meta { display: flex; gap: 8px; align-items: center; font-size: 11px; color: var(--muted); margin: 5px 6px 0; }
.msg .meta button { color: var(--muted); font-size: 11px; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- 愿望清单 ---------- */
.wish-summary { position: relative; display: flex; align-items: center; gap: 18px; }
.ring { width: 92px; height: 92px; flex: none; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 11; }
.ring-track { stroke: var(--pink-soft); }
.ring-value { stroke: url(#ring-grad); stroke-linecap: round; stroke-dasharray: 314.16; stroke-dashoffset: 314.16; transition: stroke-dashoffset 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.ring-label {
  position: absolute; left: 18px; width: 92px;
  text-align: center; font-family: var(--num); color: var(--pink-deep);
}
.ring-label b { font-size: 24px; font-weight: 800; }
.ring-label span { font-size: 12px; }
.wish-summary-text p { font-size: 13px; margin-top: 6px; line-height: 1.5; }

.pill-form {
  display: flex; gap: 8px; align-items: center;
  padding: 6px 6px 6px 8px;
  margin-bottom: 16px;
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow);
}
.pill-form input { background: transparent; border-radius: 999px; }
.pill-form input:focus { background: transparent; box-shadow: none; border-color: transparent; }

.wishes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.wish {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 12px 14px 14px;
  border-radius: 18px;
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow-sm);
  animation: rise 0.3s;
}
.wish .tick {
  width: 28px; height: 28px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 2px solid #f2c3d2;
  color: transparent; font-size: 16px;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}
.wish .tick:active { transform: scale(0.85); }
.wish .info { flex: 1; min-width: 0; }
.wish .title { font-weight: 600; word-break: break-word; }
.wish .sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.wish .remove { color: #cdb9c1; font-size: 16px; padding: 6px; }
.wish.done { background: rgba(255, 255, 255, 0.5); box-shadow: none; }
.wish.done .tick { background: var(--grad); border-color: transparent; color: #fff; }
.wish.done .title { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(240, 87, 127, 0.5); }

/* ---------- 空状态 / 提示 / 爱心特效 ---------- */
.empty { text-align: center; padding: 36px 0 20px; color: var(--muted); font-size: 13px; }
.empty-art {
  display: inline-grid; place-items: center;
  width: 76px; height: 76px; border-radius: 50%;
  font-size: 34px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}
.empty p { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 4px; }

.toast {
  position: fixed; z-index: 40;
  left: 50%; bottom: calc(86px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  max-width: calc(100vw - 40px);
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(61, 43, 51, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff; font-size: 14px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.4);
  animation: toast-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } }

.burst {
  position: fixed; z-index: 50; pointer-events: none;
  color: var(--pink);
  animation: burst 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
@keyframes burst {
  0% { transform: translate(-50%, -50%) scale(0.4); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.1) rotate(var(--rot)); opacity: 0; }
}

/* ---------- 登录页 ---------- */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  overflow: hidden;
}
.login-page .hero-hearts span { color: rgba(255, 122, 162, 0.35); bottom: -40px; animation-duration: 12s; }
.login-card {
  position: relative;
  width: 100%; max-width: 360px;
  text-align: center;
  display: flex; flex-direction: column; gap: 14px;
  padding: 34px 24px 28px;
}
.login-card h1 { font-size: 24px; font-weight: 800; letter-spacing: 1px; }
.login-card .muted { font-size: 14px; margin-top: -6px; }
.login-heart {
  width: 84px; height: 84px; margin: 0 auto 4px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--grad);
  color: #fff; font-size: 40px;
  box-shadow: 0 0 0 10px rgba(255, 122, 162, 0.12), 0 14px 30px -10px rgba(240, 87, 127, 0.7);
  animation: beat 1.6s ease-in-out infinite;
}
.login-card input { text-align: center; letter-spacing: 2px; }
.login-error { color: #e0405f; font-size: 13px; }
.shake { animation: shake 0.4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

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