/* ===== 全局变量 ===== */
:root {
  --bg0: #070a12;
  --bg1: #111b3f;
  --bg2: #3b0b5b;
  --card: rgba(255, 255, 255, 0.08);
  --card-border: rgba(255, 255, 255, 0.14);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.72);
  --accent: #ff4d8d;
  --accent2: #7c3aed;
  --ok: #22c55e;
  --danger: #ef4444;
}

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

body {
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(
      1200px 800px at 25% 20%,
      rgb(var(--accent2-rgb, 124 58 237) / 0.62) 0%,
      rgb(var(--accent2-rgb, 124 58 237) / 0) 60%
    ),
    radial-gradient(
      1000px 800px at 80% 80%,
      rgb(var(--accent-rgb, 255 77 141) / 0.56) 0%,
      rgb(var(--accent-rgb, 255 77 141) / 0) 58%
    ),
    linear-gradient(180deg, var(--bg1), var(--bg0) 55%, var(--bg2));
  background-attachment: fixed;
}

/* ===== 噪点纹理 ===== */
.noise {
  position: fixed; inset: 0; pointer-events: none; opacity: 0.06; z-index: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

/* ===== 导航栏 ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px;
  background:
    linear-gradient(
      90deg,
      rgb(var(--accent2-rgb, 124 58 237) / 0.14),
      rgba(7, 10, 18, 0.72),
      rgb(var(--accent-rgb, 255 77 141) / 0.14)
    );
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgb(var(--accent-rgb, 255 77 141) / 0.10);
}

.nav-brand {
  font-size: 18px; font-weight: 800; letter-spacing: 0.5px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; text-decoration: none;
}

.nav-links { display: flex; gap: 6px; align-items: center; }

.nav-link {
  padding: 6px 14px; border-radius: 10px; font-size: 13px; font-weight: 600;
  color: var(--muted); text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.nav-link:hover, .nav-link.active {
  background: rgb(var(--accent-rgb, 255 77 141) / 0.16);
  color: var(--text);
}

.nav-user {
  font-size: 12px; color: var(--muted); margin-right: 8px;
}

.btn-logout {
  appearance: none; border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06); color: var(--muted);
  padding: 5px 12px; border-radius: 8px; font-size: 12px; cursor: pointer;
  transition: background 0.15s;
}

.btn-logout:hover { background: rgba(255, 255, 255, 0.12); }

/* ===== 页面容器 ===== */
.page {
  position: relative; z-index: 1;
  max-width: 900px; margin: 0 auto; padding: 24px 16px 80px;
}

/* ===== 卡片 ===== */
.card {
  border-radius: 18px; padding: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.05));
  border: 1px solid rgb(var(--accent2-rgb, 124 58 237) / 0.16);
  backdrop-filter: blur(10px);
  box-shadow:
    0 16px 50px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgb(var(--accent-rgb, 255 77 141) / 0.06);
}

/* ===== 通用按钮 ===== */
.btn {
  appearance: none; border: none; font-weight: 700; font-size: 14px;
  padding: 10px 20px; border-radius: 12px; cursor: pointer;
  color: white; transition: filter 0.15s, transform 0.06s;
}

.btn:active { transform: translateY(1px); }
.btn:hover { filter: brightness(1.08); }

.btn-primary {
  background: linear-gradient(
    180deg,
    var(--accent),
    rgb(var(--accent-rgb, 255 77 141) / 0.76)
  );
  box-shadow: 0 8px 20px rgb(var(--accent-rgb, 255 77 141) / 0.28);
}

.btn-ok {
  background: linear-gradient(180deg, var(--ok), rgba(34, 197, 94, 0.7));
  box-shadow: 0 8px 20px rgba(34, 197, 94, 0.2);
}

.btn-danger {
  background: linear-gradient(180deg, var(--danger), rgba(239, 68, 68, 0.6));
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.2);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--muted);
}

/* ===== 表单 ===== */
.input {
  width: 100%; padding: 10px 14px; border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text); font-size: 14px; outline: none;
  transition: border-color 0.15s;
}

.input:focus { border-color: var(--accent); }

.input::placeholder { color: rgba(255, 255, 255, 0.35); }

.form-group { margin-bottom: 14px; }

.form-label {
  display: block; margin-bottom: 6px;
  font-size: 13px; font-weight: 600; color: var(--muted);
}

/* ===== 纪念日卡片 ===== */
.section-title {
  margin-top: 18px;
  font-size: 13px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.78);
  letter-spacing: 0.6px;
}

.anniversary-grid {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px; margin-top: 16px;
}

.anniversary-card {
  border-radius: 16px; padding: 16px;
  border: 1px solid rgb(var(--accent-rgb, 255 77 141) / 0.22);
  background: rgb(var(--accent-rgb, 255 77 141) / 0.07);
  text-align: center;
  transition: transform 0.15s, box-shadow 0.15s;
}

.anniversary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgb(var(--accent-rgb, 255 77 141) / 0.16);
}

.anniversary-card.primary {
  border-color: rgb(var(--accent-rgb, 255 77 141) / 0.45);
  background: rgb(var(--accent-rgb, 255 77 141) / 0.14);
}

.anniversary-name {
  font-size: 16px; font-weight: 800; margin-bottom: 6px;
}

.anniversary-date {
  font-size: 13px; color: var(--muted); margin-bottom: 10px;
}

.anniversary-counter {
  font-size: 14px; color: var(--accent); font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.anniversary-actions {
  margin-top: 10px; display: flex; gap: 6px; justify-content: center;
}

/* ===== 首页轮播 ===== */
.home-carousel {
  margin-top: 14px;
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  position: relative;
}

.home-carousel-track {
  position: relative;
  width: 100%;
  height: 280px;
}

.home-carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.home-carousel-slide.active {
  opacity: 1;
}

.home-carousel-slide a {
  display: block;
  width: 100%;
  height: 100%;
}

.home-carousel-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-carousel-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.58), rgba(0,0,0,0));
  color: rgba(255,255,255,0.95);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.home-carousel-title {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-carousel-meta {
  font-size: 12px;
  color: rgba(255,255,255,0.78);
}

.home-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.28);
  color: rgba(255,255,255,0.92);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.home-carousel-arrow:hover {
  background: rgba(0,0,0,0.40);
}

.home-carousel-arrow.prev {
  left: 12px;
}

.home-carousel-arrow.next {
  right: 12px;
}

.home-carousel-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 8px;
  pointer-events: none;
}

.home-carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255,255,255,0.40);
  pointer-events: auto;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.12);
}

.home-carousel-dot.active {
  background: rgba(255,255,255,0.90);
}

.btn-sm {
  padding: 4px 10px; font-size: 11px; border-radius: 8px;
}

/* ===== 浮动音乐播放器 ===== */
.music-float {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 55;
  width: 300px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: box-shadow 0.2s ease;
}

.timeline-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.timeline-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.timeline-view {
  display: inline-flex;
  align-items: center;
  padding: 4px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
}

.timeline-view-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
  font-size: 12px;
  padding: 7px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.06s;
}

.timeline-view-btn:hover {
  background: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.9);
}

.timeline-view-btn:active {
  transform: translateY(1px);
}

.timeline-view-btn.active {
  background: rgb(var(--accent-rgb, 255 77 141) / 0.20);
  color: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 18px rgb(var(--accent-rgb, 255 77 141) / 0.18);
}

.timeline-loading {
  margin-top: 14px;
  text-align: center;
  color: rgba(255, 255, 255, 0.78);
}

.timeline-empty {
  margin-top: 14px;
  text-align: center;
  color: rgba(255, 255, 255, 0.72);
}

.timeline-list {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.timeline-item-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.timeline-item-title {
  font-weight: 900;
  font-size: 15px;
}

.timeline-item-date {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.62);
  font-variant-numeric: tabular-nums;
}

.timeline-item-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.timeline-item-ops {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.timeline-op {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.78);
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.timeline-op:hover {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
}

.timeline-op.danger {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.10);
  color: rgba(255, 255, 255, 0.88);
}

.timeline-op.danger:hover {
  background: rgba(239, 68, 68, 0.18);
}

.timeline-item-content {
  margin-top: 10px;
  white-space: pre-wrap;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
}

.timeline-cover {
  margin-top: 10px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.timeline-cover img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.timeline-thumbs {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.timeline-thumb {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.10);
  display: block;
}

.timeline-thumb img {
  display: block;
  width: 100%;
  height: 54px;
  object-fit: cover;
}

.timeline-gallery {
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.timeline-day {
  display: grid;
  gap: 10px;
}

.timeline-day-title {
  appearance: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  font-weight: 950;
  letter-spacing: 0.2px;
  color: rgba(255, 255, 255, 0.86);
  font-variant-numeric: tabular-nums;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

.timeline-day-title:hover {
  background: rgba(255, 255, 255, 0.10);
}

.timeline-day-arrow {
  display: inline-block;
  width: 18px;
  opacity: 0.9;
  transform: rotate(0deg);
  transition: transform 0.15s ease;
}

.timeline-day-text {
  flex: 1;
}

.timeline-day-count {
  font-size: 12px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.68);
}

.timeline-day-title[aria-expanded="false"] .timeline-day-arrow {
  transform: rotate(-90deg);
}

.timeline-day-body {
  margin-top: 10px;
}

.timeline-day-body.collapsed {
  display: none;
}

.timeline-day-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.timeline-day-stack {
  display: grid;
  gap: 12px;
}

.timeline-day-milestones {
  display: grid;
  gap: 14px;
}

.timeline-photo {
  position: relative;
  display: block;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.timeline-photo img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.timeline-photo-meta {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(10px);
}

.timeline-photo-title {
  font-weight: 900;
  font-size: 12px;
}

.timeline-photo-date {
  margin-top: 2px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.68);
  font-variant-numeric: tabular-nums;
}

.timeline-milestones {
  gap: 14px;
}

.timeline-milestone {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 14px;
  padding: 16px;
}

.timeline-milestone-media {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.timeline-milestone-media img {
  display: block;
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.timeline-milestone-placeholder {
  width: 100%;
  height: 140px;
  background:
    radial-gradient(180px 140px at 20% 30%, rgb(var(--accent2-rgb, 124 58 237) / 0.35), rgba(0,0,0,0)),
    radial-gradient(220px 160px at 80% 70%, rgb(var(--accent-rgb, 255 77 141) / 0.35), rgba(0,0,0,0)),
    rgba(255, 255, 255, 0.04);
}

.timeline-milestone-title {
  font-weight: 950;
  font-size: 16px;
}

.timeline-milestone-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.timeline-milestone-date {
  margin-top: 4px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.62);
  font-variant-numeric: tabular-nums;
}

.timeline-milestone-content {
  margin-top: 10px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
  white-space: pre-wrap;
}

.timeline-milestone-count {
  margin-top: 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.70);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
}

.modal.open {
  display: block;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
}

.modal-panel {
  position: relative;
  width: min(680px, calc(100vw - 24px));
  margin: 8vh auto 0;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(15, 18, 35, 0.92), rgba(10, 12, 22, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.modal-title {
  font-size: 14px;
  font-weight: 950;
}

.modal-close {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85);
  width: 34px;
  height: 34px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 18px;
  line-height: 32px;
}

.modal-body {
  padding: 14px;
}

.modal-foot {
  padding: 12px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.timeline-upload-hint {
  margin-top: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.62);
}

.timeline-photo-preview {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.timeline-preview-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.timeline-preview-item img {
  display: block;
  width: 100%;
  height: 66px;
  object-fit: cover;
}

.timeline-preview-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  line-height: 18px;
  font-weight: 900;
}

.timeline-photo-existing {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.timeline-existing-item {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.timeline-existing-item img {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.timeline-existing-ops {
  padding: 10px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.timeline-mini {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.80);
  padding: 6px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.timeline-mini.danger {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.10);
}

.album-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.album-card {
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  display: grid;
}

.album-cover {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.album-cover img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.album-cover-placeholder {
  width: 100%;
  height: 180px;
  background:
    radial-gradient(220px 160px at 20% 30%, rgb(var(--accent2-rgb, 124 58 237) / 0.35), rgba(0,0,0,0)),
    radial-gradient(260px 200px at 80% 70%, rgb(var(--accent-rgb, 255 77 141) / 0.35), rgba(0,0,0,0)),
    rgba(255, 255, 255, 0.04);
}

.album-meta {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}

.album-title {
  font-size: 15px;
  font-weight: 950;
}

.album-desc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.70);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.album-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.album-count {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.86);
  font-variant-numeric: tabular-nums;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.22);
}

.album-updated {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  font-variant-numeric: tabular-nums;
}

.album-breadcrumb {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.70);
}

.album-breadcrumb a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
}

.album-breadcrumb a:hover {
  text-decoration: underline;
}

.album-breadcrumb-sep {
  margin: 0 6px;
  color: rgba(255, 255, 255, 0.45);
}

.album-photo-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.album-photo-card {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.album-photo-link {
  display: block;
}

.album-photo-card img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.album-photo-ops {
  padding: 10px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.timeline-uploading {
  margin-top: 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
}

.timeline-error {
  margin-top: 10px;
  font-size: 12px;
  color: rgba(239, 68, 68, 0.92);
}

@media (max-width: 820px) {
  .timeline-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
  .timeline-thumbs {
    grid-template-columns: repeat(4, 1fr);
  }
  .timeline-photo-preview {
    grid-template-columns: repeat(4, 1fr);
  }
  .timeline-photo-existing {
    grid-template-columns: repeat(2, 1fr);
  }
  .timeline-milestone {
    grid-template-columns: 1fr;
  }
  .timeline-milestone-media img,
  .timeline-milestone-placeholder {
    height: 200px;
  }
  .timeline-day-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .album-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .album-photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .home-carousel-track {
    height: 240px;
  }
}

.music-float:hover {
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.music-float-handle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: linear-gradient(
    135deg,
    rgb(var(--accent-rgb, 255 77 141) / 0.28),
    rgb(var(--accent2-rgb, 124 58 237) / 0.28)
  );
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  cursor: grab;
  user-select: none;
}

.music-float-handle:active {
  cursor: grabbing;
}

.music-float-icon {
  font-size: 18px;
  line-height: 1;
  animation: musicPulse 2s ease-in-out infinite;
}

@keyframes musicPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.music-float-label {
  flex: 1;
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
  letter-spacing: 0.3px;
}

.music-float-toggle {
  appearance: none;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  width: 26px;
  height: 26px;
  border-radius: 8px;
  font-size: 11px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s, color 0.15s;
}

.music-float-toggle:hover {
  background: rgba(255, 255, 255, 0.18);
  color: white;
}

.music-float-pop {
  appearance: none;
  border: none;
  background: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.74);
  width: 26px;
  height: 26px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s, color 0.15s, transform 0.06s;
}

.music-float-pop:hover {
  background: rgba(255, 255, 255, 0.18);
  color: white;
}

.music-float-pop:active {
  transform: translateY(1px);
}

.music-float-body {
  display: none;
  background: rgba(7, 10, 18, 0.95);
}

.music-fallback {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.music-fallback-link {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  transition: background 0.15s, color 0.15s;
}

.music-fallback-link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
}

.music-playlist-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 12px 0;
}

.music-playlist-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.78);
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.music-playlist-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
}

.music-audio {
  width: 100%;
  display: block;
  padding: 10px 12px;
}

/* ===== 登录页 ===== */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 20px;
}

.login-card {
  width: min(400px, 92vw); text-align: center;
}

.login-title {
  font-size: 24px; font-weight: 900; margin-bottom: 6px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-subtitle {
  font-size: 13px; color: var(--muted); margin-bottom: 20px;
}

.login-error {
  color: var(--danger); font-size: 13px; margin-top: 8px; min-height: 1.4em;
}

/* ===== 页面标题 ===== */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; flex-wrap: wrap; gap: 10px;
}

.page-title {
  font-size: 22px; font-weight: 900;
}

/* ===== 空状态 ===== */
.empty-state {
  text-align: center; padding: 40px 20px; color: var(--muted); font-size: 14px;
}

/* ===== 占位页面（Phase 2） ===== */
.coming-soon {
  text-align: center; padding: 60px 20px;
}

.coming-soon h2 {
  font-size: 20px; margin-bottom: 8px;
}

.coming-soon p {
  color: var(--muted); font-size: 14px;
}
