/* ============================================================
   恋爱日记 · 公开页样式
   ============================================================ */

:root {
  --plum: #2b1630;
  --plum-deep: #1c0e22;
  --plum-soft: #4a1e4f;
  --rose: #e05c7a;
  --rose-deep: #c94566;
  --rose-soft: #f3a6ba;
  --champagne: #d9a87e;
  --champagne-soft: #f0d3b0;
  --blush: #fbf3f5;
  --cream: #fffafb;
  --ink: #3c2a34;
  --ink-soft: #7a6470;
  --line: rgba(224, 92, 122, 0.18);

  --serif: "Cormorant Garamond", "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STZhongsong", "SimSun", serif;
  --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-card: 0 30px 60px -25px rgba(60, 20, 45, 0.35);
}

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

/* 确保 hidden 属性始终生效（避免 display:flex 等覆盖掉隐藏状态） */
[hidden] { display: none !important; }

body.is-loading { overflow: hidden; }
.archive-loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  background: #171514;
  transition: opacity 700ms ease, visibility 700ms ease;
}
.archive-loader.is-complete { opacity: 0; visibility: hidden; pointer-events: none; }
.archive-loader__frame, .archive-loader__wash { position: absolute; inset: 0; }
.archive-loader__image {
  width: 100%; height: 100%; background: #26211f center/cover no-repeat;
  filter: saturate(.72) contrast(1.08);
  transform: scale(1.04);
}
.archive-loader__image.is-rushing { animation: archiveRush .16s steps(3, end); }
@keyframes archiveRush {
  0% { filter: saturate(.6) contrast(1.18) blur(18px); transform: translate3d(-4%,0,0) scale(1.16); }
  45% { filter: saturate(.9) contrast(1.28) blur(7px); transform: translate3d(3%,0,0) scale(1.1); }
  100% { filter: saturate(.72) contrast(1.08) blur(0); transform: translate3d(0,0,0) scale(1.04); }
}
.archive-loader__wash { background: linear-gradient(90deg, rgba(15,12,11,.82), rgba(15,12,11,.28)); }
.archive-loader__content { position: relative; z-index: 1; width: min(520px, calc(100% - 48px)); }
.archive-loader__kicker { margin-bottom: 22px; font-size: 10px; letter-spacing: .28em; color: rgba(255,255,255,.62); }
.archive-loader__title { font-family: var(--serif); font-size: clamp(30px, 5vw, 58px); line-height: 1.08; }
.archive-loader__progress { height: 1px; margin-top: 42px; background: rgba(255,255,255,.26); transform-origin: left; }
.archive-loader__progress span { display: block; width: 100%; height: 100%; background: var(--champagne); transform: scaleX(0); transform-origin: left; }
.archive-loader__status { margin-top: 14px; font-size: 10px; letter-spacing: .14em; color: rgba(255,255,255,.54); }
@media (prefers-reduced-motion: reduce) { .archive-loader { transition-duration: 200ms; } }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.7;
}

::selection { background: var(--rose); color: #fff; }

/* 粒子画布 */
#fx-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ============ 首屏 ============ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
  background: #302126;
  z-index: 1;
}

.hero-media {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 700ms ease;
}
.hero.has-photo .hero-media { opacity: 1; }
.hero-shade {
  position: absolute;
  inset: 0;
  background: rgba(28, 18, 23, 0.62);
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 60px 24px;
}

.hero-kicker {
  font-family: var(--serif);
  letter-spacing: 0.35em;
  font-size: 0.95rem;
  color: var(--champagne-soft);
  text-transform: uppercase;
  margin-bottom: 28px;
}

.hero-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  line-height: 1.15;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, #fff 20%, var(--champagne-soft) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 18px;
  text-shadow: 0 0 0 transparent;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.4vw, 1.25rem);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.82);
  letter-spacing: 0.12em;
  margin-bottom: 54px;
}

/* 天数计数器 */
.day-counter {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  padding: 26px 46px;
  border: 1px solid rgba(240, 211, 176, 0.4);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
  margin-bottom: 34px;
}
.day-counter__label {
  position: absolute;
  transform: translateY(-46px);
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
}
.day-counter__num {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 8vw, 4.4rem);
  font-weight: 500;
  line-height: 1;
  background: linear-gradient(180deg, #fff, var(--champagne));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.day-counter__unit {
  font-size: 1.1rem;
  color: var(--champagne-soft);
  letter-spacing: 0.2em;
}

.hero-names {
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: 0.28em;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 54px;
}

/* 下滑提示 */
.scroll-hint {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.25em;
}
.scroll-hint__arrow {
  width: 1px;
  height: 44px;
  background: linear-gradient(180deg, var(--rose-soft), transparent);
  position: relative;
  overflow: hidden;
}
.scroll-hint__arrow::after {
  content: "";
  position: absolute;
  left: 0;
  top: -50%;
  width: 100%;
  height: 50%;
  background: #fff;
  animation: drip 1.8s ease-in-out infinite;
}
@keyframes drip {
  0% { top: -50%; }
  100% { top: 110%; }
}

/* ============ 主内容 ============ */
.main {
  position: relative;
  z-index: 1;
  background:
    linear-gradient(180deg, var(--cream), var(--blush) 30%, var(--cream) 100%);
  padding: 100px 24px 120px;
}

.section-head {
  text-align: center;
  margin-bottom: 40px;
}
.section-head__kicker {
  font-family: var(--serif);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--rose);
  margin-bottom: 12px;
}
.section-head__title {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  color: var(--plum);
  margin-bottom: 18px;
}
.section-head__line {
  width: 64px;
  height: 2px;
  margin: 0 auto 18px;
  background: linear-gradient(90deg, transparent, var(--rose), transparent);
}
.section-head__desc {
  color: var(--ink-soft);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
}

/* 年份筛选 */
.year-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 70px;
}
.year-chip {
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  padding: 8px 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.35s var(--ease);
}
.year-chip:hover { border-color: var(--rose); color: var(--rose); transform: translateY(-2px); }
.year-chip.is-active {
  background: linear-gradient(135deg, var(--rose), var(--rose-deep));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 24px -8px rgba(224, 92, 122, 0.6);
}

/* ============ 时间线 ============ */
.timeline {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, var(--line) 6%, var(--line) 94%, transparent);
}

.memory {
  position: relative;
  width: 50%;
  padding: 0 56px 90px;
}
.memory:nth-child(odd) { left: 0; text-align: right; }
.memory:nth-child(even) { left: 50%; text-align: left; }

.memory__dot {
  position: absolute;
  top: 8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--rose);
  box-shadow: 0 0 0 6px rgba(224, 92, 122, 0.15), 0 0 24px rgba(224, 92, 122, 0.5);
  z-index: 2;
}
.memory:nth-child(odd) .memory__dot { right: -9px; }
.memory:nth-child(even) .memory__dot { left: -9px; }

.memory__card {
  position: relative;
  display: inline-block;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
  text-align: left;
  width: 100%;
}
.memory__card:hover {
  transform: translateY(-10px) scale(1.012);
  box-shadow: 0 44px 80px -28px rgba(60, 20, 45, 0.45);
}

button:focus-visible,
a:focus-visible,
.memory__card:focus-visible {
  outline: 3px solid var(--champagne);
  outline-offset: 4px;
}

.memory__media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f3e9ee;
}
.memory__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease), filter 0.9s var(--ease);
}
.memory__card:hover .memory__media img { transform: scale(1.08); }

.memory__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(28, 14, 34, 0.55));
  pointer-events: none;
}

.memory__date {
  position: absolute;
  bottom: 12px;
  left: 18px;
  z-index: 1;
  font-family: var(--serif);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.memory__body { padding: 22px 26px 26px; }
.memory__title {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--plum);
  margin-bottom: 8px;
  line-height: 1.4;
}
.memory__desc {
  color: var(--ink-soft);
  font-size: 0.95rem;
  white-space: pre-wrap;
  word-break: break-word;
}

/* 空状态 */
.empty-state { text-align: center; color: var(--ink-soft); padding: 40px 0; }
.empty-state__icon { font-size: 3rem; margin-bottom: 16px; }

/* ============ 页脚 ============ */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 70px 24px 80px;
  background: linear-gradient(180deg, var(--cream), var(--plum-deep));
  color: rgba(255, 255, 255, 0.85);
}
.footer__heart {
  font-size: 1.4rem;
  color: var(--rose);
  animation: pulse 1.6s ease-in-out infinite;
  margin-bottom: 14px;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.35); }
}
.footer__text { font-family: var(--serif); font-size: 1.1rem; letter-spacing: 0.12em; margin-bottom: 8px; }
.footer__meta { font-size: 0.8rem; opacity: 0.55; letter-spacing: 0.1em; }

/* ============ 灯箱 ============ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(18, 8, 20, 0.94);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}
.lightbox__img {
  max-width: 78vw;
  max-height: 76vh;
  border-radius: 4px;
  box-shadow: 0 40px 90px -20px rgba(0, 0, 0, 0.8);
  animation: zoomIn 0.4s var(--ease);
}
.lightbox__close {
  position: absolute;
  top: 24px;
  right: 30px;
  font-size: 2.6rem;
  line-height: 1;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s;
}
.lightbox__close:hover { opacity: 1; }
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s;
}
.lightbox__nav:hover { background: rgba(255, 255, 255, 0.2); }
.lightbox__nav--prev { left: 28px; }
.lightbox__nav--next { right: 28px; }
.lightbox__caption {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: #fff;
  width: 90%;
  max-width: 640px;
}
.lightbox__date { font-family: var(--serif); color: var(--champagne); letter-spacing: 0.2em; font-size: 0.9rem; margin-bottom: 6px; }
.lightbox__title { font-family: var(--serif); font-size: 1.5rem; margin-bottom: 6px; }
.lightbox__desc { color: rgba(255, 255, 255, 0.8); font-size: 0.95rem; white-space: pre-wrap; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes zoomIn { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }

/* 回到顶部 */
.back-top {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 90;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--rose), var(--rose-deep));
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 12px 30px -8px rgba(224, 92, 122, 0.6);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.4s var(--ease);
}
.back-top.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-top:hover { transform: translateY(-4px); }

/* ============ 滚动渐显 ============ */
[data-reveal],
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
[data-reveal].is-revealed,
.reveal.is-revealed {
  opacity: 1;
  transform: none;
}
[data-reveal] { transition-delay: var(--d, 0s); }

/* ============ 响应式 ============ */
@media (max-width: 760px) {
  .hero { min-height: 720px; }
  .hero-inner { padding: 72px 22px 34px; }
  .hero-kicker { letter-spacing: 0.18em; }
  .hero-subtitle { letter-spacing: 0.05em; margin-bottom: 48px; }
  .day-counter { gap: 8px; }
  .day-counter__label { letter-spacing: 0.16em; }
  .timeline::before { left: 22px; }
  .memory { width: 100%; left: 0 !important; text-align: left !important; padding: 0 0 60px 54px; }
  .memory:nth-child(odd) .memory__dot,
  .memory:nth-child(even) .memory__dot { left: 13px; right: auto; }
  .day-counter { padding: 20px 28px; }
  .lightbox__img { max-width: 92vw; }
  .lightbox__nav { width: 44px; height: 44px; font-size: 1.5rem; }
  .lightbox__nav--prev { left: 12px; }
  .lightbox__nav--next { right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
  html { scroll-behavior: auto; }
}

/* ============ 纪念日倒计时 ============ */
.milestone {
  margin-top: -14px;
  margin-bottom: 30px;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.06em;
}
.milestone__years {
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--champagne);
  margin: 0 2px;
}
.milestone__days {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
  margin: 0 3px;
}

/* ============ 背景音乐开关 ============ */
.music-toggle {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 60;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s var(--ease), background 0.3s, box-shadow 0.3s;
}
.music-toggle:hover { transform: scale(1.08); background: rgba(255, 255, 255, 0.22); }
.music-toggle.is-playing {
  box-shadow: 0 0 0 6px rgba(224, 92, 122, 0.25), 0 0 30px rgba(224, 92, 122, 0.55);
  border-color: rgba(240, 211, 176, 0.7);
}
.music-toggle.is-playing .music-toggle__icon {
  animation: musicBob 0.9s ease-in-out infinite;
}
@keyframes musicBob {
  0%, 100% { transform: translateY(0) rotate(0); }
  25% { transform: translateY(-3px) rotate(-8deg); }
  75% { transform: translateY(-3px) rotate(8deg); }
}

/* ============ 视图切换 ============ */
.view-toggle {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 26px;
}
.view-toggle__btn {
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  padding: 9px 26px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.3s var(--ease);
}
.view-toggle__btn.is-active {
  background: linear-gradient(135deg, var(--plum), var(--plum-soft));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 24px -10px rgba(43, 22, 48, 0.6);
}

/* ============ 在一起N天 徽标 ============ */
.memory__meta { margin-bottom: 8px; }
.memory__days {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--rose-deep);
  background: rgba(224, 92, 122, 0.1);
  border: 1px solid rgba(224, 92, 122, 0.25);
  padding: 3px 12px;
  border-radius: 999px;
}

/* ============ 日历视图 ============ */
.calendar-view { max-width: 760px; margin: 0 auto; }
.calendar {
  background: #fff;
  border-radius: 24px;
  padding: 26px 26px 20px;
  box-shadow: var(--shadow-card);
}
.calendar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.calendar__title { font-family: var(--serif); font-size: 1.4rem; color: var(--plum); font-weight: 600; }
.calendar__nav {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 1.4rem;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
.calendar__nav:hover { border-color: var(--rose); color: var(--rose); transform: scale(1.08); }
.calendar__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.calendar__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-cell {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  cursor: default;
  transition: background 0.2s, transform 0.2s;
}
.cal-cell--empty { pointer-events: none; }
.cal-cell__num { font-family: var(--serif); font-size: 1rem; color: var(--ink); }
.cal-cell.has-entry {
  background: rgba(224, 92, 122, 0.1);
  cursor: pointer;
}
.cal-cell.has-entry:hover { background: rgba(224, 92, 122, 0.2); transform: scale(1.08); }
.cal-cell.is-today .cal-cell__num {
  color: var(--rose-deep);
  font-weight: 700;
}
.cal-cell.is-selected {
  background: linear-gradient(135deg, var(--rose), var(--rose-deep));
  box-shadow: 0 10px 24px -8px rgba(224, 92, 122, 0.6);
}
.cal-cell.is-selected .cal-cell__num { color: #fff; font-weight: 600; }
.cal-cell__dot {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--rose);
  color: #fff;
  font-size: 0.7rem;
  line-height: 18px;
  text-align: center;
}
.cal-cell.is-selected .cal-cell__dot { background: #fff; color: var(--rose-deep); }

.calendar-day { margin-top: 24px; }
.cal-day__head {
  font-family: var(--serif);
  color: var(--plum);
  margin-bottom: 14px;
  font-size: 1.05rem;
}
.cal-day__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.cal-day__item {
  display: flex;
  gap: 12px;
  align-items: center;
  background: #fff;
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 12px 26px -16px rgba(60, 20, 45, 0.35);
  cursor: pointer;
  transition: transform 0.3s var(--ease);
}
.cal-day__item:hover { transform: translateY(-4px); }
.cal-day__item img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; flex-shrink: 0; }
.cal-day__title { font-family: var(--serif); font-size: 0.95rem; color: var(--plum); }
.cal-day__days { font-size: 0.78rem; color: var(--rose-deep); }

/* ============ 情话便签墙 ============ */
.notes-section {
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, var(--cream), var(--blush));
  padding: 100px 24px 120px;
}
.notes-wall {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  justify-content: center;
  padding: 20px;
}
.note {
  position: relative;
  width: 210px;
  min-height: 170px;
  padding: 40px 22px 22px;
  border-radius: 6px;
  box-shadow: 0 14px 30px -12px rgba(60, 20, 45, 0.35);
  transform: rotate(var(--r, 0deg));
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
  animation: noteDrop 0.6s var(--ease) both;
}
.note:hover { transform: rotate(0deg) translateY(-8px) scale(1.03); box-shadow: 0 26px 44px -14px rgba(60, 20, 45, 0.45); }
.note::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  width: 82px;
  height: 26px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.note__text {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--plum);
  white-space: pre-wrap;
  word-break: break-word;
}
.note__author {
  display: block;
  margin-top: 12px;
  text-align: right;
  font-size: 0.82rem;
  color: var(--ink-soft);
}
@keyframes noteDrop { from { opacity: 0; transform: translateY(-20px) rotate(var(--r, 0deg)); } to { opacity: 1; transform: rotate(var(--r, 0deg)); } }

.note--rose { background: #ffe4e9; }
.note--mint { background: #dff2ec; }
.note--sky { background: #e1eefa; }
.note--cream { background: #fff3d8; }
.note--lilac { background: #ebe3f8; }

.notes-empty { text-align: center; color: var(--ink-soft); padding: 30px 0; }

/* 日历/时间线切换时隐藏 */
#timeline[hidden], #year-filter[hidden], #calendar-view[hidden] { display: none !important; }

/* ============ 响应式补充 ============ */
@media (max-width: 760px) {
  .note { width: 46%; }
  .music-toggle { top: 16px; right: 16px; width: 46px; height: 46px; }
}
