/* ============================================================
   Dream Laden Bough（梦满枝）· 主题样式
   ============================================================ */

:root {
  --accent: #8b7bff;
  --accent-2: #59a5ff;
  --accent-3: #ff9d7a;
  --bg: #08070f;
  --text: #eef0f8;
  --muted: rgba(238, 240, 248, 0.62);
  --faint: rgba(238, 240, 248, 0.36);
  --glass: rgba(255, 255, 255, 0.055);
  --glass-2: rgba(255, 255, 255, 0.085);
  --line: rgba(255, 255, 255, 0.1);
  --line-soft: rgba(255, 255, 255, 0.06);
  --radius: 24px;
  --radius-sm: 16px;
  --shadow: 0 30px 70px -40px rgba(0, 0, 0, 0.9);
  --serif: "Iowan Old Style", "Palatino Linotype", "Palatino", Georgia, "Songti SC", "Noto Serif SC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: rgba(139, 123, 255, 0.32); }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; color: inherit; }
input, textarea, select { font-family: inherit; }

/* ---------------------------- 背景层 ---------------------------- */

.bg-layer { position: fixed; inset: 0; z-index: -3; overflow: hidden; background: #08070f; }

.bg-layer::before {
  content: "";
  position: absolute; inset: -12%;
  background:
    radial-gradient(38% 34% at 22% 20%, rgba(139, 123, 255, 0.62), transparent 68%),
    radial-gradient(34% 30% at 78% 14%, rgba(89, 165, 255, 0.5), transparent 70%),
    radial-gradient(40% 36% at 66% 84%, rgba(255, 122, 162, 0.34), transparent 70%),
    radial-gradient(36% 34% at 12% 82%, rgba(94, 234, 212, 0.26), transparent 70%);
  filter: blur(26px);
  opacity: 0.95;
  transition: opacity 0.6s ease;
  animation: drift 26s ease-in-out infinite alternate;
}

@keyframes drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-2.5%, 1.5%, 0) scale(1.05); }
  100% { transform: translate3d(2%, -1.5%, 0) scale(1.02); }
}

.bg-layer::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, rgba(255, 255, 255, 0.75), transparent),
    radial-gradient(1px 1px at 32% 62%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1.4px 1.4px at 58% 28%, rgba(255, 255, 255, 0.65), transparent),
    radial-gradient(1px 1px at 76% 48%, rgba(255, 255, 255, 0.45), transparent),
    radial-gradient(1.1px 1.1px at 88% 76%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(1px 1px at 45% 88%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1.2px 1.2px at 68% 8%, rgba(255, 255, 255, 0.5), transparent);
  opacity: 0.6;
}

.bg-image {
  position: absolute; inset: -6%;
  background-size: cover;
  background-position: center;
  filter: blur(22px) saturate(1.1) brightness(0.62);
  transform: scale(1.04);
  opacity: 0;
  transition: opacity 0.9s ease;
}
.bg-image.on { opacity: 1; }
body.has-bg .bg-layer::before { opacity: 0.25; }

.bg-veil {
  position: absolute; inset: 0;
  background:
    radial-gradient(1100px 700px at 78% -8%, rgba(139, 123, 255, 0.2), transparent 62%),
    radial-gradient(900px 600px at 6% 104%, rgba(89, 165, 255, 0.16), transparent 62%),
    linear-gradient(180deg, rgba(8, 7, 15, 0.3), rgba(8, 7, 15, 0.62) 58%, rgba(8, 7, 15, 0.94) 100%);
}

.bg-grain {
  position: absolute; inset: 0; opacity: 0.35; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.32'/%3E%3C/svg%3E");
}

/* ---------------------------- 导航 ---------------------------- */

.nav {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 26px;
  padding: 14px clamp(18px, 4vw, 40px);
  background: linear-gradient(180deg, rgba(10, 9, 18, 0.78), rgba(10, 9, 18, 0.42));
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--line-soft);
}

.brand { display: flex; align-items: center; gap: 11px; font-weight: 600; letter-spacing: 0.01em; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, rgba(169, 155, 255, 0.22), rgba(89, 165, 255, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-text { font-family: var(--serif); font-size: 17px; letter-spacing: 0.03em; white-space: nowrap; }

.nav-links { display: flex; align-items: center; gap: 4px; margin-left: 10px; flex: 1; }
.nav-links a {
  position: relative; padding: 8px 15px; border-radius: 999px;
  font-size: 14px; color: var(--muted); transition: color 0.22s, background 0.22s;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.055); }
.nav-links a.active { color: #fff; background: rgba(255, 255, 255, 0.09); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 50%; bottom: -7px; transform: translateX(-50%);
  width: 18px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.nav-tail { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line-soft);
  color: var(--muted); cursor: pointer; transition: all 0.22s;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.1); border-color: var(--line); transform: translateY(-1px); }

/* ---------------------------- 布局 ---------------------------- */

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 32px); }

main.wrap { padding-top: 34px; padding-bottom: 80px; min-height: calc(100vh - 260px); }

.view-enter { animation: rise 0.55s cubic-bezier(0.22, 0.68, 0.24, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.card {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(26px) saturate(1.3);
  -webkit-backdrop-filter: blur(26px) saturate(1.3);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  margin: 46px 0 18px;
}
.section-head h2 {
  font-family: var(--serif); font-size: 22px; font-weight: 600; margin: 0; letter-spacing: 0.01em;
}
.section-head .sub { color: var(--faint); font-size: 12.5px; margin-top: 5px; letter-spacing: 0.04em; }
.section-head .more { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; transition: color 0.2s, gap 0.2s; }
.section-head .more:hover { color: #fff; gap: 10px; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head h1 { font-family: var(--serif); font-size: clamp(28px, 4vw, 40px); margin: 0 0 8px; font-weight: 600; letter-spacing: -0.01em; }
.page-head p { margin: 0; color: var(--muted); font-size: 14px; max-width: 56ch; line-height: 1.7; }

/* ---------------------------- 按钮 ---------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06); color: var(--text);
  font-size: 13.5px; font-weight: 500; cursor: pointer;
  transition: transform 0.2s, background 0.2s, border-color 0.2s, opacity 0.2s;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { background: rgba(255, 255, 255, 0.11); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary {
  background: linear-gradient(135deg, #8b7bff, #6f8bff 55%, #59a5ff);
  border-color: transparent; color: #fff;
  box-shadow: 0 12px 28px -14px rgba(120, 120, 255, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn.primary:hover { filter: brightness(1.07); }
.btn.ghost { background: transparent; }
.btn.danger { color: #ff9a9a; border-color: rgba(255, 120, 120, 0.28); background: rgba(255, 90, 90, 0.08); }
.btn.small { padding: 7px 13px; font-size: 12.5px; }
.btn[disabled] { opacity: 0.55; pointer-events: none; }

/* ---------------------------- 首页 ---------------------------- */

.hero { display: grid; grid-template-columns: 1.12fr 0.88fr; gap: 18px; }

.profile { padding: 34px 34px 28px; position: relative; overflow: hidden; }
.profile::after {
  content: ""; position: absolute; right: -60px; top: -80px; width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(139, 123, 255, 0.28), transparent 68%);
  pointer-events: none;
}
.profile-top { display: flex; gap: 22px; align-items: center; }
.avatar-frame {
  width: 88px; height: 88px; border-radius: 28px; flex: 0 0 auto; padding: 2px;
  background: linear-gradient(150deg, rgba(169, 155, 255, 0.95), rgba(89, 165, 255, 0.75), rgba(255, 157, 122, 0.65));
  box-shadow: 0 16px 36px -18px rgba(139, 123, 255, 0.9);
}
.avatar-frame img {
  width: 100%; height: 100%; border-radius: 26px; object-fit: cover; display: block;
  background: #14121f;
}
.avatar-fallback {
  width: 100%; height: 100%; border-radius: 26px;
  display: grid; place-items: center; background: #14121f;
  font-family: var(--serif); font-size: 30px; color: #cdc7ff;
}

.profile-name { font-family: var(--serif); font-size: clamp(26px, 3vw, 34px); margin: 0; font-weight: 600; letter-spacing: -0.01em; }
.profile-handle { color: var(--faint); font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase; margin-top: 6px; }
.bio { color: var(--muted); font-size: 14px; line-height: 1.8; margin: 20px 0 0; max-width: 50ch; }

.stats { display: flex; align-items: stretch; margin-top: 26px; }
.stat { padding-right: 24px; margin-right: 24px; border-right: 1px solid var(--line-soft); }
.stat:last-child { border: 0; margin-right: 0; padding-right: 0; }
.stat b { display: block; font-family: var(--serif); font-size: 26px; font-weight: 600; line-height: 1.1; }
.stat span { font-size: 11.5px; color: var(--faint); letter-spacing: 0.08em; }

.player { padding: 24px; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--faint);
  border: 1px solid var(--line); padding: 4px 10px; border-radius: 8px;
}
.player-main { display: flex; gap: 16px; align-items: center; }
.player-cover {
  width: 66px; height: 66px; border-radius: 18px; flex: 0 0 auto; object-fit: cover;
  background: linear-gradient(140deg, rgba(139, 123, 255, 0.4), rgba(89, 165, 255, 0.22));
  border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden;
}
.player-cover svg { width: 24px; height: 24px; opacity: 0.7; }
.player-title { font-size: 15.5px; font-weight: 600; margin: 0 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-artist { font-size: 12.5px; color: var(--faint); margin: 0; }

.progress { position: relative; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.13); cursor: pointer; }
.progress i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 4px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.progress i::after {
  content: ""; position: absolute; right: -4px; top: 50%; transform: translateY(-50%);
  width: 9px; height: 9px; border-radius: 50%; background: #fff; opacity: 0; transition: opacity 0.2s;
  box-shadow: 0 0 0 3px rgba(139, 123, 255, 0.3);
}
.progress:hover i::after { opacity: 1; }
.time-row { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); margin-top: 7px; font-variant-numeric: tabular-nums; }

.controls { display: flex; align-items: center; justify-content: center; gap: 20px; }
.ctrl { width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; transition: color 0.2s, background 0.2s; }
.ctrl svg { width: 18px; height: 18px; }
.ctrl:hover { color: #fff; background: rgba(255, 255, 255, 0.07); }
.ctrl.play {
  width: 50px; height: 50px; color: #fff;
  background: linear-gradient(140deg, #8b7bff, #6b8bff 60%, #59a5ff);
  box-shadow: 0 14px 30px -14px rgba(120, 120, 255, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.ctrl.play svg { width: 20px; height: 20px; }
.ctrl.play:hover { filter: brightness(1.08); }

.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 18px; }
.quick {
  padding: 22px; display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.3s;
}
.quick:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, 0.18); }
.quick .q-icon {
  width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(150deg, rgba(139, 123, 255, 0.22), rgba(89, 165, 255, 0.12));
  border: 1px solid var(--line); color: #cfc9ff;
}
.quick .q-icon svg { width: 19px; height: 19px; }
.quick h3 { margin: 4px 0 0; font-size: 15px; font-weight: 600; }
.quick p { margin: 0; color: var(--faint); font-size: 12.5px; line-height: 1.65; }

/* 说说卡片 */
.moment-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.moment-card { padding: 22px; display: flex; flex-direction: column; gap: 14px; transition: transform 0.35s, border-color 0.3s; }
.moment-card:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, 0.17); }
.moment-meta { display: flex; align-items: center; gap: 9px; font-size: 11.5px; color: var(--faint); letter-spacing: 0.03em; }
.moment-meta .tag { border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; letter-spacing: 0.12em; font-size: 9.5px; text-transform: uppercase; }
.moment-text { font-size: 14.5px; line-height: 1.85; color: rgba(238, 240, 248, 0.9); white-space: pre-wrap; word-break: break-word; }
.clamp-4 { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.moment-thumb { width: 100%; height: 150px; object-fit: cover; border-radius: 14px; border: 1px solid var(--line-soft); }

/* 照片横向预览 */
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(190px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 94%, transparent); mask-image: linear-gradient(90deg, #000 94%, transparent); }
.strip::-webkit-scrollbar { display: none; }
.strip-item { position: relative; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; border: 1px solid var(--line-soft); cursor: zoom-in; }
.strip-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
.strip-item:hover img { transform: scale(1.06); }

/* ---------------------------- 照片墙 ---------------------------- */

.masonry { columns: 3; column-gap: 16px; }
.photo-card {
  break-inside: avoid; margin-bottom: 16px; position: relative; border-radius: 18px; overflow: hidden;
  border: 1px solid var(--line-soft); cursor: zoom-in; background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.3s, transform 0.3s;
}
.photo-card:hover { border-color: rgba(255, 255, 255, 0.2); transform: translateY(-2px); }
.photo-card img { width: 100%; height: auto; display: block; transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.photo-card:hover img { transform: scale(1.04); }
.photo-cap {
  position: absolute; inset: auto 0 0 0; padding: 26px 16px 13px;
  background: linear-gradient(180deg, transparent, rgba(6, 6, 12, 0.82));
  font-size: 12.5px; opacity: 0; transform: translateY(8px); transition: all 0.35s;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.photo-card:hover .photo-cap { opacity: 1; transform: none; }
.photo-del {
  width: 26px; height: 26px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.4); color: #ffb4b4; display: grid; place-items: center; cursor: pointer; flex: 0 0 auto;
}
.photo-del svg { width: 14px; height: 14px; }

/* ---------------------------- 音乐馆 ---------------------------- */

.music-layout { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 18px; align-items: start; }
.now-playing { padding: 30px; display: flex; flex-direction: column; gap: 20px; }
.big-cover {
  width: 100%; max-width: 360px; margin: 0 auto; aspect-ratio: 1 / 1; border-radius: 22px; overflow: hidden; position: relative;
  background:
    radial-gradient(circle at 30% 25%, rgba(139, 123, 255, 0.34), transparent 62%),
    radial-gradient(circle at 72% 78%, rgba(89, 165, 255, 0.26), transparent 62%),
    linear-gradient(150deg, #1d1836, #101728);
  border: 1px solid var(--line); display: grid; place-items: center;
}
.big-cover img { width: 100%; height: 100%; object-fit: cover; }
.big-cover > span { display: grid; place-items: center; }
.big-cover > span svg { width: 78px; height: 78px; opacity: 0.35; }
.big-cover .vinyl { width: 42%; height: 42%; opacity: 0.4; }
.big-cover.spinning img { animation: spin 22s linear infinite; border-radius: 50%; }
@keyframes spin { to { transform: rotate(360deg); } }

.playlist { padding: 14px; display: flex; flex-direction: column; gap: 4px; max-height: 620px; overflow-y: auto; }
.playlist::-webkit-scrollbar { width: 6px; }
.playlist::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border-radius: 6px; }
.track {
  display: flex; align-items: center; gap: 13px; padding: 11px 13px; border-radius: 13px;
  cursor: pointer; transition: background 0.2s; border: 1px solid transparent;
}
.track:hover { background: rgba(255, 255, 255, 0.055); }
.track.active { background: rgba(139, 123, 255, 0.14); border-color: rgba(139, 123, 255, 0.3); }
.track-no { width: 20px; font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; text-align: center; flex: 0 0 auto; }
.track.active .track-no { color: #cfc9ff; }
.track-body { flex: 1; min-width: 0; }
.track-name { font-size: 13.5px; margin: 0 0 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-artist { font-size: 11.5px; color: var(--faint); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-dur { font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.track-del { width: 24px; height: 24px; border: 0; background: transparent; color: rgba(255, 160, 160, 0.7); cursor: pointer; display: grid; place-items: center; border-radius: 7px; opacity: 0; transition: opacity 0.2s, background 0.2s; }
.track:hover .track-del { opacity: 1; }
.track-del:hover { background: rgba(255, 90, 90, 0.14); color: #ff9a9a; }
.track-del svg { width: 14px; height: 14px; }

.equalizer { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.equalizer span { width: 2px; background: #b3a8ff; border-radius: 1px; animation: eq 1s ease-in-out infinite; }
.equalizer span:nth-child(1) { height: 6px; animation-delay: 0s; }
.equalizer span:nth-child(2) { height: 11px; animation-delay: 0.18s; }
.equalizer span:nth-child(3) { height: 8px; animation-delay: 0.36s; }
@keyframes eq { 0%, 100% { transform: scaleY(0.4); } 50% { transform: scaleY(1); } }

/* ---------------------------- 说说页 ---------------------------- */

.composer { padding: 22px; margin-bottom: 26px; }
.composer textarea {
  width: 100%; min-height: 96px; resize: vertical; border: 0; outline: 0;
  background: transparent; color: var(--text); font-size: 14.5px; line-height: 1.85;
}
.composer textarea::placeholder { color: var(--faint); }
.composer-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.composer-tools { display: flex; align-items: center; gap: 8px; }
.composer-previews { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.composer-previews .pv { position: relative; width: 76px; height: 76px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.composer-previews .pv img { width: 100%; height: 100%; object-fit: cover; }
.composer-previews .pv button {
  position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; border-radius: 50%;
  border: 0; background: rgba(0, 0, 0, 0.65); color: #fff; font-size: 11px; line-height: 1; cursor: pointer;
}

.timeline { position: relative; display: flex; flex-direction: column; gap: 16px; }
.timeline::before {
  content: ""; position: absolute; left: 19px; top: 8px; bottom: 8px; width: 1px;
  background: linear-gradient(180deg, rgba(139, 123, 255, 0.5), rgba(255, 255, 255, 0.05));
}
.tl-item { position: relative; padding-left: 52px; }
.tl-dot {
  position: absolute; left: 12px; top: 24px; width: 15px; height: 15px; border-radius: 50%;
  background: #0d0c17; border: 1px solid rgba(139, 123, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(139, 123, 255, 0.1);
}
.tl-dot::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: linear-gradient(140deg, #a99bff, #59a5ff); }
.tl-card { padding: 22px 24px; transition: border-color 0.3s; }
.tl-card:hover { border-color: rgba(255, 255, 255, 0.16); }
.tl-time { font-size: 12px; color: var(--faint); margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.tl-text { font-size: 14.5px; line-height: 1.9; white-space: pre-wrap; word-break: break-word; margin: 0; }
.tl-images { display: grid; gap: 8px; margin-top: 14px; }
.tl-images img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line-soft); cursor: zoom-in; display: block; max-height: 420px; object-fit: cover; }
.tl-del {
  position: absolute; right: 16px; top: 16px; width: 28px; height: 28px; border-radius: 9px;
  border: 1px solid var(--line-soft); background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 160, 160, 0.8); display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity 0.2s;
}
.tl-card:hover .tl-del { opacity: 1; }
.tl-del svg { width: 14px; height: 14px; }

/* ---------------------------- 留言墙 ---------------------------- */

.wall { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }

.note {
  position: relative; margin: 0;
  padding: 22px 20px 15px; border-radius: 18px;
  background: linear-gradient(160deg, rgba(30, 27, 48, 0.82), rgba(18, 16, 30, 0.72));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 50px -34px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: rotate(var(--rot, 0deg));
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.3s, box-shadow 0.3s;
}
.note::before {
  content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 3px;
  background: var(--note, var(--accent)); opacity: 0.82;
}
.note:hover {
  transform: rotate(0deg) translateY(-3px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 32px 60px -34px rgba(0, 0, 0, 1), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.note.c0 { --note: #8b7bff; }
.note.c1 { --note: #59a5ff; }
.note.c2 { --note: #ff9d7a; }
.note.c3 { --note: #5eead4; }
.note.c4 { --note: #ff8fb1; }
.note.c5 { --note: #ffd166; }

.note-tape {
  position: absolute; top: -7px; left: 50%; width: 52px; height: 14px;
  transform: translateX(-50%) rotate(-1.6deg); border-radius: 3px;
  background: rgba(255, 255, 255, 0.13); border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.note-mood { font-size: 13px; line-height: 1; margin-left: 2px; opacity: 0.95; }
.note-text {
  margin: 0; font-size: 14.5px; line-height: 1.92; white-space: pre-wrap;
  word-break: break-word; color: rgba(238, 240, 248, 0.94);
}
.note-foot {
  display: flex; align-items: center; gap: 8px; margin-top: 16px; padding-top: 12px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}
.note-avatar {
  width: 22px; height: 22px; border-radius: 8px; display: grid; place-items: center;
  font-size: 11px; color: #fff; flex: 0 0 auto;
  background: linear-gradient(140deg, var(--note, var(--accent)), rgba(255, 255, 255, 0.22));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.note-name { font-size: 12px; color: var(--muted); max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-time { margin-left: auto; font-size: 11px; color: var(--faint); white-space: nowrap; }
.note-del {
  width: 24px; height: 24px; border-radius: 8px; border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.04); color: rgba(255, 160, 160, 0.8);
  display: grid; place-items: center; cursor: pointer; opacity: 0; flex: 0 0 auto;
  transition: opacity 0.2s, background 0.2s;
}
.note:hover .note-del { opacity: 1; }
.note-del:hover { background: rgba(255, 90, 90, 0.14); color: #ff9a9a; }
.note-del svg { width: 13px; height: 13px; }
.note.compact .note-text {
  font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 4;
  -webkit-box-orient: vertical; overflow: hidden;
}

/* 留言表单 */
.gb-form { padding: 22px 22px 16px; margin-bottom: 26px; }
.gb-top { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.gb-top input[type="text"] {
  flex: 1 1 200px; min-width: 0; padding: 9px 14px; border-radius: 12px; font-size: 13.5px;
  background: rgba(255, 255, 255, 0.045); border: 1px solid var(--line); color: var(--text);
  outline: 0; transition: border-color 0.2s, background 0.2s;
}
.gb-top input[type="text"]:focus { border-color: rgba(139, 123, 255, 0.6); background: rgba(255, 255, 255, 0.07); }
.gb-moods { display: flex; align-items: center; gap: 4px; }
.gb-mood {
  width: 30px; height: 30px; padding: 0; border-radius: 10px; border: 1px solid transparent;
  background: transparent; font-size: 15px; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.gb-mood:hover { background: rgba(255, 255, 255, 0.07); transform: translateY(-1px); }
.gb-mood.on { background: rgba(139, 123, 255, 0.2); border-color: rgba(139, 123, 255, 0.5); }
.gb-form textarea {
  width: 100%; min-height: 88px; margin-top: 14px; resize: vertical; border: 0; outline: 0;
  background: transparent; color: var(--text); font-size: 14.5px; line-height: 1.9;
}
.gb-form textarea::placeholder { color: var(--faint); }
.gb-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line-soft);
}
.gb-count { font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }

.guest-invite { display: flex; align-items: center; gap: 18px; padding: 24px; flex-wrap: wrap; }
.guest-invite .gi-icon {
  width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: #cfc9ff;
  background: linear-gradient(150deg, rgba(139, 123, 255, 0.22), rgba(89, 165, 255, 0.12));
  border: 1px solid var(--line); flex: 0 0 auto;
}
.guest-invite .gi-icon svg { width: 20px; height: 20px; }
.guest-invite > div { flex: 1 1 320px; min-width: 0; }
.guest-invite h3 { margin: 0 0 5px; font-size: 15px; }
.guest-invite p { margin: 0; color: var(--faint); font-size: 12.5px; line-height: 1.7; }
.guest-invite .btn { margin-left: auto; }

/* ---------------------------- 后台 ---------------------------- */

.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.panel { padding: 26px; }
.panel h3 { margin: 0 0 4px; font-size: 16px; font-weight: 600; }
.panel .hint { margin: 0 0 20px; color: var(--faint); font-size: 12.5px; line-height: 1.7; }

.field { margin-bottom: 15px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 7px; letter-spacing: 0.04em; }
.field input[type="text"], .field input[type="password"], .field textarea {
  width: 100%; padding: 11px 14px; border-radius: 12px; font-size: 13.5px;
  background: rgba(255, 255, 255, 0.045); border: 1px solid var(--line); color: var(--text);
  outline: 0; transition: border-color 0.2s, background 0.2s;
}
.field input:focus, .field textarea:focus { border-color: rgba(139, 123, 255, 0.6); background: rgba(255, 255, 255, 0.07); }
.field textarea { min-height: 84px; resize: vertical; line-height: 1.7; }

.media-row { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.media-prev {
  width: 92px; height: 92px; border-radius: 16px; overflow: hidden; flex: 0 0 auto;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); display: grid; place-items: center;
  color: var(--faint); font-size: 11px; text-align: center; padding: 6px;
}
.media-prev img { width: 100%; height: 100%; object-fit: cover; }
.media-prev.wide { width: 180px; height: 100px; }

.login-card { max-width: 420px; margin: 8vh auto 0; padding: 34px; }
.login-card h1 { font-family: var(--serif); margin: 0 0 6px; font-size: 26px; }
.login-card p { color: var(--muted); font-size: 13px; margin: 0 0 22px; line-height: 1.7; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 6px; }
.stat-box { padding: 16px; border-radius: 16px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-soft); }
.stat-box b { display: block; font-family: var(--serif); font-size: 22px; }
.stat-box span { font-size: 11.5px; color: var(--faint); }

/* ---------------------------- 空状态 ---------------------------- */

.empty { padding: 64px 24px; text-align: center; border-radius: var(--radius); border: 1px dashed rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.02); }
.empty svg { width: 46px; height: 46px; opacity: 0.35; margin-bottom: 14px; }
.empty h3 { margin: 0 0 8px; font-size: 15.5px; font-weight: 600; }
.empty p { margin: 0 auto 18px; color: var(--faint); font-size: 13px; max-width: 42ch; line-height: 1.8; }

/* ---------------------------- 灯箱 / 弹窗 ---------------------------- */

.lightbox {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
  background: rgba(4, 4, 9, 0.9); backdrop-filter: blur(14px); padding: 4vh 5vw;
  animation: fade 0.28s ease both;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.lightbox img { max-width: 100%; max-height: 88vh; border-radius: 14px; box-shadow: 0 40px 90px -40px #000; }
.lb-cap { position: fixed; bottom: 4vh; left: 0; right: 0; text-align: center; font-size: 13px; color: var(--muted); }
.lb-btn {
  position: fixed; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.07); color: #fff; display: grid; place-items: center; cursor: pointer;
  transition: background 0.2s;
}
.lb-btn:hover { background: rgba(255, 255, 255, 0.16); }
.lb-btn svg { width: 20px; height: 20px; }
.lb-close { top: 24px; right: 24px; }
.lb-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 24px; top: 50%; transform: translateY(-50%); }

.modal-root { position: fixed; inset: 0; z-index: 210; display: none; }
.modal-root.open { display: grid; place-items: center; background: rgba(4, 4, 9, 0.72); backdrop-filter: blur(10px); animation: fade 0.22s ease both; padding: 20px; }
.modal { width: min(480px, 100%); padding: 26px; animation: rise 0.3s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.modal h3 { margin: 0 0 18px; font-size: 17px; font-family: var(--serif); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

.toast-wrap { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  padding: 10px 18px; border-radius: 999px; font-size: 13px; color: #fff;
  background: rgba(22, 20, 34, 0.92); border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 40px -20px #000; backdrop-filter: blur(14px);
  animation: toastIn 0.35s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.toast.err { border-color: rgba(255, 110, 110, 0.4); }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------------------------- 悬浮迷你播放器 ---------------------------- */

.mini-player {
  position: fixed; left: 20px; bottom: 20px; z-index: 90;
  display: flex; align-items: center; gap: 12px; padding: 10px 16px 10px 10px;
  border-radius: 999px; background: rgba(18, 16, 28, 0.9); border: 1px solid var(--line);
  backdrop-filter: blur(18px); box-shadow: 0 20px 50px -24px #000; cursor: pointer;
  animation: rise 0.4s ease both;
}
.mini-player[hidden] { display: none; }
.mini-player .mc { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: rgba(139, 123, 255, 0.3); }
.mini-player .mt { font-size: 12.5px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-player .mp { width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.1); display: grid; place-items: center; cursor: pointer; }
.mini-player svg { width: 15px; height: 15px; }

/* ---------------------------- 页脚 ---------------------------- */

.site-footer { border-top: 1px solid var(--line-soft); padding: 22px 0 30px; background: rgba(8, 7, 15, 0.5); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--faint); }
.footer-left { display: flex; align-items: center; gap: 12px; }
.clock { font-variant-numeric: tabular-nums; letter-spacing: 0.08em; color: var(--muted); font-size: 13px; }
.dot { width: 4px; height: 4px; border-radius: 50%; background: rgba(255, 255, 255, 0.25); }

/* ---------------------------- 响应式 ---------------------------- */

@media (max-width: 980px) {
  .nav { gap: 14px; }
  .brand-text { font-size: 15px; }
  .nav-links a { padding: 7px 11px; font-size: 13.5px; }
  .hero { grid-template-columns: 1fr; }
  .music-layout { grid-template-columns: 1fr; }
  .admin-grid { grid-template-columns: 1fr; }
  .moment-grid { grid-template-columns: 1fr 1fr; }
  .quick-grid { grid-template-columns: 1fr 1fr; }
  .masonry { columns: 2; }
  .wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .nav { padding: 12px 16px; gap: 10px; flex-wrap: wrap; }
  .brand-text { display: none; }
  .nav-links { order: 3; width: 100%; overflow-x: auto; gap: 2px; margin: 4px 0 0; padding-bottom: 2px; }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { padding: 7px 12px; font-size: 13px; }
  .nav-tail { margin-left: auto; }
  main.wrap { padding-top: 22px; }
  .profile { padding: 24px; }
  .profile-top { gap: 16px; }
  .avatar-frame { width: 72px; height: 72px; border-radius: 22px; }
  .avatar-frame img, .avatar-frame .avatar-fallback { border-radius: 20px; }
  .stat { padding-right: 16px; margin-right: 16px; }
  .stat b { font-size: 22px; }
  .moment-grid, .quick-grid { grid-template-columns: 1fr; }
  .masonry { columns: 1; }
  .wall { grid-template-columns: minmax(0, 1fr); }
  .quick-grid { grid-template-columns: 1fr; }
  .guest-invite { flex-direction: column; align-items: flex-start; }
  .guest-invite .btn { margin-left: 0; }
  .mini-player { left: 12px; bottom: 12px; }
  .section-head { margin-top: 34px; }
  .tl-item { padding-left: 40px; }
  .timeline::before { left: 13px; }
  .tl-dot { left: 6px; }
}
