:root {
  --bg: #fff8fa;
  --surface: #ffffff;
  --border: #f6e4ec;
  --border-strong: #e8ccd9;
  --text: #432e3b;
  --text-secondary: #a2848f;
  --text-light: #cbaeb9;
  --accent: #ff6b9d;
  --accent-strong: #e1306c;
  --accent-soft: #fff0f5;
  --gradient: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  --gradient-soft: linear-gradient(135deg, #ffd6e0 0%, #e8d5ff 50%, #ffe4cc 100%);
  --shadow-sm: 0 1px 3px rgba(255, 120, 160, 0.08);
  --shadow-md: 0 4px 20px rgba(255, 120, 160, 0.1);
  --shadow-lg: 0 8px 40px rgba(255, 120, 160, 0.16);
  --radius: 18px;
  --radius-sm: 12px;
  --font: "Plus Jakarta Sans", "Noto Sans SC", -apple-system, BlinkMacSystemFont, sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tabbar-h: calc(56px + var(--safe-bottom));
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  overflow-x: hidden;
}

button {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 2px;
}

/* ── 浪漫开场动画 ── */
.intro {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #ffe6f0 0%, #ffd9e8 32%, #f3ddff 68%, #ffe9d6 100%);
  overflow: hidden;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.intro.done {
  opacity: 0;
  transform: translateY(-4%);
  pointer-events: none;
}

.intro-hearts {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.heart-petal {
  position: absolute;
  bottom: -48px;
  opacity: 0;
  animation-name: petal-rise;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@keyframes petal-rise {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.85;
  }
  100% {
    transform: translateY(-112vh) rotate(45deg);
    opacity: 0;
  }
}

.intro-content {
  text-align: center;
  animation: intro-pop 0.8s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}

@keyframes intro-pop {
  from {
    opacity: 0;
    transform: scale(0.86);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.intro-heart {
  display: inline-block;
  font-size: 3.4rem;
  line-height: 1;
  animation: beat 1.2s ease-in-out infinite;
}

.intro-logo {
  font-size: clamp(2.2rem, 10vw, 3.2rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.1;
  margin-top: 4px;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: intro-fade 0.9s 0.15s both;
}

.intro-sub {
  margin-top: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #c96a8f;
  animation: intro-fade 0.9s 0.35s both;
}

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

.intro-progress {
  position: absolute;
  bottom: calc(18% + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.7);
  overflow: hidden;
}

.intro-progress i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 2px;
  background: var(--gradient);
  animation: intro-bar 3s ease forwards;
}

.intro.skip .intro-progress i {
  animation: none;
  width: 100%;
}

@keyframes intro-bar {
  to {
    width: 100%;
  }
}

/* ── 浪漫气球 ── */
.balloon-layer {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.balloon {
  position: absolute;
  bottom: -150px;
  --dur: 18s;
  --delay: 0s;
  --hue: 340;
  --scale: 1;
  animation: balloon-rise var(--dur) linear var(--delay) infinite;
  will-change: transform;
}

.balloon-body {
  position: relative;
  display: block;
  width: 44px;
  height: 54px;
  border-radius: 50% 50% 48% 52% / 46% 46% 54% 54%;
  background:
    radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.65), transparent 42%),
    linear-gradient(160deg, hsl(var(--hue), 82%, 82%), hsl(calc(var(--hue) + 24), 78%, 66%));
  box-shadow: inset -5px -8px 14px rgba(120, 30, 70, 0.12), 0 6px 18px rgba(220, 90, 140, 0.16);
  animation: balloon-swing 3.4s ease-in-out infinite alternate;
  transform-origin: 50% 100%;
}

.balloon-body::before {
  content: "";
  position: absolute;
  top: 11px;
  left: 10px;
  width: 7px;
  height: 11px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  transform: rotate(-20deg);
}

.balloon-body::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid hsl(var(--hue), 78%, 68%);
}

.balloon-string {
  display: block;
  width: 1.5px;
  height: 44px;
  margin: -2px auto 0;
  border-radius: 1px;
  background: linear-gradient(rgba(150, 90, 110, 0.38), rgba(150, 90, 110, 0.1));
}

@keyframes balloon-rise {
  0% {
    transform: translateY(0) translateX(0) scale(var(--scale));
  }
  25% {
    transform: translateY(-28vh) translateX(14px) scale(var(--scale));
  }
  50% {
    transform: translateY(-55vh) translateX(-12px) scale(var(--scale));
  }
  75% {
    transform: translateY(-82vh) translateX(10px) scale(var(--scale));
  }
  100% {
    transform: translateY(-115vh) translateX(-6px) scale(var(--scale));
  }
}

@keyframes balloon-swing {
  from {
    transform: rotate(-5deg);
  }
  to {
    transform: rotate(6deg);
  }
}

/* 背景渐变 blob */
.bg-blobs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
}

.blob-1 {
  width: 280px;
  height: 280px;
  background: #ffd6e8;
  top: -80px;
  right: -60px;
}

.blob-2 {
  width: 220px;
  height: 220px;
  background: #e4d4ff;
  top: 40%;
  left: -80px;
}

.blob-3 {
  width: 200px;
  height: 200px;
  background: #ffe8d6;
  bottom: 10%;
  right: -40px;
}

/* App 容器 — 手机 feed 宽度 */
.app {
  position: relative;
  z-index: 2;
  max-width: 430px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: 0 16px calc(96px + var(--safe-bottom));
}

/* 顶栏 */
.top-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0 10px;
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 248, 250, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.avatar-ring {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient);
  padding: 2px;
  flex-shrink: 0;
}

.avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.logo {
  flex: 1;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.top-date {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 999px;
}

/* Stories */
.stories {
  display: flex;
  gap: 16px;
  padding: 2px 2px 18px;
  overflow-x: auto;
  scrollbar-width: none;
}

.stories::-webkit-scrollbar {
  display: none;
}

.story {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: none;
  background: none;
  cursor: pointer;
  font-family: var(--font);
  padding: 0;
}

.story-ring {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  padding: 3px;
  background: conic-gradient(from 210deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888, #f09433);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.story:active .story-ring {
  transform: scale(0.92);
}

.story-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.story-name {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

/* Hero 计数卡片 */
.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px 24px;
  text-align: center;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-soft);
  opacity: 0.35;
  pointer-events: none;
}

.hero-card > * {
  position: relative;
}

.hero-tag {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.hero-days {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin-bottom: 8px;
}

.hero-num {
  font-size: clamp(3rem, 14vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-variant-numeric: tabular-nums;
  transition: transform 0.25s ease;
}

.hero-num.tick {
  animation: pop 0.35s ease;
}

@keyframes pop {
  50% {
    transform: scale(1.04);
  }
}

.hero-unit {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
}

.hero-clock {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.hero-clock b {
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.hero-clock .dot {
  color: var(--text-light);
}

.hero-caption {
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 500;
}

/* Feed 标题 */
.feed-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 2px;
}

.feed-header h2 {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: lowercase;
}

.feed-count {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Feed 卡片 */
.feed {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.feed-loading,
.feed-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.feed-empty-icon {
  display: block;
  font-size: 2rem;
  margin-bottom: 10px;
}

.post {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transform: translateY(12px);
  animation: slide-up 0.45s ease forwards;
}

@keyframes slide-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.post-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 0;
}

.post-emoji {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gradient);
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.post-emoji span {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-meta {
  flex: 1;
  min-width: 0;
}

.post-title {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-date {
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 1px;
}

.post-menu {
  position: relative;
}

.post-menu-btn {
  width: 34px;
  height: 34px;
  border: none;
  background: none;
  color: var(--text-light);
  font-size: 1.1rem;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 1px;
  transition: background 0.15s;
}

.post-menu-btn:hover {
  background: var(--bg);
  color: var(--text-secondary);
}

.post-body {
  padding: 10px 14px 14px;
}

.post.has-photo .post-body {
  padding-top: 8px;
}

.post-photo {
  margin-top: 2px;
  cursor: zoom-in;
}

.post-photo img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  background: var(--bg);
}

.post-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.65;
  white-space: pre-wrap;
}

/* 帖子互动行 */
.post-bar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px 10px 0;
}

.post-icon {
  width: 42px;
  height: 42px;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: transform 0.15s ease;
}

.post-icon:active {
  transform: scale(1.28);
}

.post-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.post-icon.liked {
  color: #e1306c;
}

.post-icon.liked svg {
  fill: #e1306c;
  animation: like-pop 0.35s ease;
}

@keyframes like-pop {
  40% {
    transform: scale(1.35);
  }
}

.like-count {
  margin-left: auto;
  padding-right: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.post-actions {
  display: none;
  gap: 6px;
  padding: 2px 14px 12px;
}

.post-actions.open {
  display: flex;
}

.post-action {
  flex: 1;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}

.post-action:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.post-action.danger:hover {
  border-color: #ffcdd2;
  background: #fff5f5;
  color: #e53935;
}

/* 底部导航 */
.tabbar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 430px;
  height: var(--tabbar-h);
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  z-index: 90;
  padding-bottom: var(--safe-bottom);
}

.tab-item {
  width: 54px;
  height: 46px;
  border: none;
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, transform 0.15s;
}

.tab-item svg {
  width: 23px;
  height: 23px;
}

.tab-item.active {
  color: var(--accent-strong);
}

.tab-item:active {
  transform: scale(0.88);
}

.tab-add {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--gradient);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(220, 39, 67, 0.35);
  transform: translateY(-10px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tab-add:active {
  transform: translateY(-10px) scale(0.9);
}

/* Footer */
.footer {
  text-align: center;
  padding: 32px 0 16px;
  font-size: 0.7rem;
  color: var(--text-light);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

/* Bottom Sheet */
.sheet {
  border: none;
  border-radius: 22px 22px 0 0;
  padding: 0;
  margin: auto 0 0 0;
  max-width: 430px;
  width: 100%;
  max-height: 90dvh;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  color: var(--text);
}

.sheet::backdrop {
  background: rgba(60, 20, 40, 0.4);
  backdrop-filter: blur(2px);
}

.sheet[open] {
  animation: sheet-up 0.3s ease;
}

@keyframes sheet-up {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--border-strong);
  border-radius: 2px;
  margin: 10px auto 0;
}

.sheet-form {
  padding: 0 0 calc(16px + var(--safe-bottom));
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.sheet-head h3 {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: lowercase;
}

.sheet-close {
  width: 34px;
  height: 34px;
  border: none;
  background: var(--bg);
  border-radius: 50%;
  font-size: 1.25rem;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.sheet-save {
  border: none;
  background: none;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 700;
  color: #e1306c;
  cursor: pointer;
  padding: 6px 4px;
}

.sheet-save:hover {
  opacity: 0.75;
}

.sheet-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  max-height: calc(90dvh - 120px);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field span {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.field input,
.field textarea {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-family: var(--font);
  font-size: 16px;
  color: var(--text);
  transition: border-color 0.15s;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
}

.field textarea {
  resize: vertical;
  min-height: 72px;
}

.sticker-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sticker {
  width: 46px;
  height: 46px;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.15s;
}

.sticker:hover {
  background: var(--accent-soft);
}

.sticker.selected {
  border-color: #e1306c;
  background: var(--accent-soft);
  transform: scale(1.05);
}

/* Photo picker */
.photo-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.photo-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 24px;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.photo-add.hidden {
  display: none;
}

.photo-add:hover {
  border-color: #e1306c;
  color: #e1306c;
  background: var(--accent-soft);
}

.photo-add svg {
  opacity: 0.6;
}

.photo-preview {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.photo-preview.hidden {
  display: none;
}

.photo-preview img {
  display: block;
  width: 100%;
  max-height: 200px;
  object-fit: cover;
}

.photo-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: white;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  backdrop-filter: blur(4px);
}

.photo-remove:hover {
  background: rgba(0, 0, 0, 0.75);
}

/* Story sheet */
.story-sheet .sheet-form {
  padding: 28px 24px calc(32px + var(--safe-bottom));
  text-align: center;
}

.story-big {
  display: inline-block;
  font-size: 3.2rem;
  line-height: 1;
  animation: beat 1.2s ease-in-out infinite;
}

.story-title {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 12px 0 2px;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.story-since {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.story-days {
  margin: 20px 0 24px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.story-days b {
  display: block;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

/* Lightbox */
.lightbox {
  border: none;
  padding: 0;
  margin: 0;
  max-width: 100vw;
  max-height: 100dvh;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox[open] {
  display: flex;
}

.lightbox::backdrop {
  background: transparent;
}

.lightbox img {
  max-width: 100%;
  max-height: 100dvh;
  object-fit: contain;
}

.lightbox-close {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Delete sheet */
.sheet-sm .sheet-form {
  padding: 8px 16px calc(24px + var(--safe-bottom));
  text-align: center;
}

.delete-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 12px 0 4px;
}

.delete-hint {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.delete-actions {
  display: flex;
  gap: 10px;
}

.btn-ghost,
.btn-delete {
  flex: 1;
  padding: 13px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: all 0.15s;
}

.btn-ghost {
  background: var(--bg);
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--border);
}

.btn-delete {
  background: #fff5f5;
  border-color: #ffcdd2;
  color: #e53935;
}

.btn-delete:hover {
  background: #ffebee;
}

/* Toast */
.toast {
  position: fixed;
  bottom: calc(100px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--text);
  color: white;
  font-size: 0.82rem;
  font-weight: 500;
  z-index: 200;
  opacity: 0;
  transition: all 0.35s ease;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.error {
  background: #e53935;
}

/* Sync badge */
.sync-badge {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
}

.sync-badge.local {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.sync-badge.cloud {
  background: rgba(255, 240, 245, 0.95);
  border: 1px solid #ffd6e8;
  color: #e1306c;
}

/* 动画节流偏好 */
@media (prefers-reduced-motion: reduce) {
  .intro,
  .heart-petal,
  .balloon {
    animation: none;
  }
}

@media (min-width: 431px) {
  .app {
    padding-top: 8px;
  }

  .sheet {
    margin-left: auto;
    margin-right: auto;
  }
}
