/* ================================================================
   江妍 · 我们的时光
   设计基调：暖 ivory 底色 + 玫瑰粉/赤金点缀，衬线大标题，
   玻璃拟态导航、柔和阴影、大量留白，克制的动效。
   ================================================================ */

:root {
  --bg: #fbf7f2;
  --bg-soft: #f6efe7;
  --card: #fffcf8;
  --ink: #43353f;
  --ink-soft: #8a7883;
  --hairline: rgba(67, 53, 63, 0.09);
  --rose: #d9607e;
  --rose-deep: #b8496a;
  --rose-soft: #f5c9d6;
  --gold: #c9a35e;
  --grad-rose: linear-gradient(120deg, #e8839b 0%, #d9607e 55%, #b8496a 100%);
  --shadow-sm: 0 1px 2px rgba(67, 53, 63, 0.05), 0 4px 14px rgba(67, 53, 63, 0.06);
  --shadow-md: 0 2px 6px rgba(67, 53, 63, 0.06), 0 16px 40px rgba(67, 53, 63, 0.10);
  --shadow-lg: 0 6px 18px rgba(67, 53, 63, 0.08), 0 30px 70px rgba(67, 53, 63, 0.14);
  --radius: 20px;
  --serif: "Noto Serif SC", "Songti SC", "STSong", serif;
  --sans: "Noto Sans SC", "PingFang SC", "Helvetica Neue", sans-serif;
}

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

/* [hidden] 必须能压过组件自身的 display（作者样式优先于 UA 样式），
   否则弹窗/灯箱带着 hidden 也照样铺满屏幕，页面看似"卡住" */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-weight: 300;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 85% -5%, rgba(232, 131, 155, 0.14), transparent 60%),
    radial-gradient(900px 420px at 8% 12%, rgba(201, 163, 94, 0.10), transparent 60%),
    var(--bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--rose-soft); color: var(--rose-deep); }

#petals {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
}

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

.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 50;
  background: rgba(251, 247, 242, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex; align-items: center; justify-content: space-between;
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }

.brand-mark {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 700; font-size: 17px;
  color: #fff;
  background: var(--grad-rose);
  border-radius: 50% 50% 50% 6px;
  box-shadow: var(--shadow-sm);
}

.brand-text { font-family: var(--serif); font-weight: 600; letter-spacing: 0.12em; font-size: 15px; }

.nav-links { display: flex; gap: 30px; }

.nav-links a {
  position: relative;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 14px; letter-spacing: 0.08em;
  transition: color 0.25s;
  padding: 4px 0;
}

.nav-links a::after {
  content: "";
  position: absolute; left: 50%; bottom: 0;
  width: 0; height: 1.5px;
  background: var(--grad-rose);
  transition: all 0.3s ease;
  transform: translateX(-50%);
  border-radius: 2px;
}

.nav-links a:hover { color: var(--rose-deep); }
.nav-links a:hover::after { width: 100%; }

.scroll-progress {
  position: absolute; bottom: -1px; left: 0;
  height: 2px; width: 0;
  background: var(--grad-rose);
}

/* ---------------- 首屏 ---------------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  z-index: 2;
}

.hero-inner { max-width: 760px; }

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  color: var(--gold);
  margin-bottom: 28px;
}

.hero-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.35;
  letter-spacing: 0.04em;
}

.grad-text {
  font-style: normal;
  background: var(--grad-rose);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-sub {
  margin-top: 22px;
  color: var(--ink-soft);
  font-size: clamp(14px, 1.8vw, 16px);
}

.day-counter {
  margin-top: 52px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}

.day-card {
  padding: 22px 46px;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  display: flex; flex-direction: column; align-items: center;
}

.day-num {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(44px, 7vw, 64px);
  line-height: 1.1;
  background: var(--grad-rose);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.day-label { font-size: 13px; letter-spacing: 0.3em; text-indent: 0.3em; color: var(--ink-soft); margin-top: 6px; }

.scroll-cue {
  position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%);
  text-decoration: none;
}

.cue-line {
  display: block;
  width: 1px; height: 52px;
  background: linear-gradient(to bottom, var(--rose), transparent);
  animation: cue 2.2s ease-in-out infinite;
}

@keyframes cue {
  0%, 100% { transform: scaleY(0.5); opacity: 0.4; transform-origin: top; }
  50% { transform: scaleY(1); opacity: 1; transform-origin: top; }
}

/* ---------------- 统计 ---------------- */

.stats {
  position: relative; z-index: 2;
  max-width: 860px;
  margin: 0 auto;
  padding: 44px 28px;
  display: flex; align-items: center; justify-content: center; gap: clamp(28px, 7vw, 72px);
  background: var(--card);
  border-block: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.stat { display: flex; flex-direction: column; align-items: center; }

.stat-num {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(28px, 4vw, 38px);
  color: var(--rose-deep);
  line-height: 1.2;
}

.stat-name { font-size: 13px; letter-spacing: 0.22em; text-indent: 0.22em; color: var(--ink-soft); margin-top: 4px; }

.stat-divider { width: 1px; height: 40px; background: var(--hairline); }

/* ---------------- 通用板块 ---------------- */

.section {
  position: relative; z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(80px, 12vh, 140px) 28px;
}

.section-tinted {
  max-width: none;
  background:
    radial-gradient(700px 300px at 15% 0%, rgba(232, 131, 155, 0.08), transparent 60%),
    var(--bg-soft);
  border-block: 1px solid var(--hairline);
}

.section-tinted > * { max-width: 1100px; margin-inline: auto; }

.section-head { text-align: center; margin-bottom: 54px; }

.section-eyebrow {
  font-size: 11px; letter-spacing: 0.55em; text-indent: 0.55em;
  color: var(--gold);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 38px);
  letter-spacing: 0.12em;
}

.section-desc { color: var(--ink-soft); margin-top: 12px; font-size: 15px; }

.timeline-actions { display: flex; justify-content: center; margin-bottom: 48px; }
.wall-upload { margin-top: 22px; }

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

.btn-primary {
  font-family: var(--sans); font-size: 15px; letter-spacing: 0.1em;
  color: #fff;
  background: var(--grad-rose);
  border: none; border-radius: 999px;
  padding: 13px 34px;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(217, 96, 126, 0.32);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: inline-flex; align-items: center; gap: 8px;
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(217, 96, 126, 0.4); }
.btn-primary:active { transform: translateY(0); }

.btn-icon { font-size: 16px; }

.btn-ghost {
  font-family: var(--sans);
  color: var(--rose-deep);
  background: transparent;
  border: 1px solid var(--rose-soft);
  border-radius: 999px;
  padding: 9px 22px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-ghost:hover { background: rgba(217, 96, 126, 0.08); }

.btn-xs { padding: 5px 14px; font-size: 12px; }
.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; margin-top: 6px; }

/* ---------------- 时光轴 ---------------- */

.tl { list-style: none; position: relative; padding: 10px 0 20px; }

.tl::before {
  content: "";
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--rose-soft) 12%, var(--rose-soft) 88%, transparent);
  transform: translateX(-0.5px);
}

.tl-item { position: relative; width: 50%; padding: 0 44px 56px; }

.tl-item:nth-child(odd) { left: 0; text-align: right; }
.tl-item:nth-child(even) { left: 50%; text-align: left; }

.tl-dot {
  position: absolute; top: 8px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--card);
  border: 2.5px solid var(--rose);
  box-shadow: 0 0 0 4px rgba(217, 96, 126, 0.14);
}

.tl-item:nth-child(odd) .tl-dot { right: -6.5px; }
.tl-item:nth-child(even) .tl-dot { left: -6.5px; }

.tl-date {
  font-family: var(--serif);
  font-size: 14px; letter-spacing: 0.06em;
  color: var(--gold);
  margin-bottom: 10px;
}

.tl-card {
  position: relative;
  display: inline-block;
  text-align: initial;
  max-width: 400px;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tl-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.tl-card-title {
  font-family: var(--serif); font-weight: 600;
  font-size: 18px; letter-spacing: 0.03em;
  margin-bottom: 6px;
}

.tl-card-text { font-size: 14.5px; color: var(--ink-soft); white-space: pre-wrap; word-break: break-word; }

.tl-thumb {
  display: block;
  margin-top: 14px;
  width: 120px; height: 90px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  cursor: zoom-in;
}

.tl-del {
  position: absolute; top: 10px;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: var(--card);
  color: var(--ink-soft);
  font-size: 12px;
  cursor: pointer;
  opacity: 0;
  transition: all 0.25s ease;
}

.tl-item:nth-child(odd) .tl-del { left: 10px; }
.tl-item:nth-child(even) .tl-del { right: 10px; }

.tl-card:hover .tl-del { opacity: 1; }
.tl-del:hover { color: #fff; background: var(--rose); border-color: var(--rose); }

/* ---------------- 照片墙（拍立得 · 错落陈列） ---------------- */

.masonry {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(212px, 1fr));
  gap: 34px 24px;
  padding: 16px 0 8px;
}

.polaroid {
  position: relative;
  background: #fff;
  padding: 9px 9px 0;
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(67, 53, 63, 0.10), 0 10px 24px rgba(67, 53, 63, 0.13);
  cursor: zoom-in;
  transform: rotate(-1.5deg);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}
/* 错落感：每张微微歪一点，悬停时摆正 */
.polaroid:nth-child(2n) { transform: rotate(1.2deg); }
.polaroid:nth-child(3n) { transform: rotate(-0.7deg); margin-top: 12px; }
.polaroid:nth-child(4n) { transform: rotate(1.8deg); margin-top: 6px; }

/* 顶部和纸胶带 */
.polaroid::before {
  content: "";
  position: absolute; top: -9px; left: 50%;
  width: 78px; height: 20px;
  transform: translateX(-50%) rotate(-3.5deg);
  background: linear-gradient(105deg, rgba(244, 187, 200, 0.75), rgba(244, 187, 200, 0.48));
  box-shadow: 0 1px 2px rgba(67, 53, 63, 0.12);
}

.polaroid:hover {
  transform: rotate(0deg) translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-lg);
  z-index: 3;
}

.polaroid-art, .polaroid img {
  width: 100%;
  display: block;
  border-radius: 2px;
}
/* 统一 4:5 相纸比例，竖屏直播截图自动居中裁切，墙面上不再高低参差 */
.polaroid img { aspect-ratio: 4 / 5; object-fit: cover; background: #f7eff1; }

.polaroid-art { aspect-ratio: 4 / 5; }

.polaroid figcaption {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-family: var(--serif);
  text-align: center;
  padding: 11px 8px 15px;
}
.polaroid .p-title {
  font-size: 14px; color: var(--ink);
  max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.polaroid .p-date {
  font-size: 11px; letter-spacing: 0.18em; text-indent: 0.18em;
  color: var(--ink-soft);
}

/* 查看更多 / 收起 */
.wall-more {
  grid-column: 1 / -1;
  justify-self: center;
  margin-top: 6px;
  padding: 10px 30px; border-radius: 999px;
  border: 1px solid rgba(217, 96, 126, 0.35);
  background: #fff; color: var(--rose-deep);
  font-size: 13.5px; letter-spacing: 0.06em; cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.wall-more:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); background: #fff7f9; }

.wall-empty, .tl-empty {
  text-align: center;
  color: var(--ink-soft);
  font-size: 14px;
  padding: 40px 0;
}

/* ---------------- 江妍の日常 · 直播截图 ---------------- */
.live-days { display: grid; gap: 44px; }

.live-day-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 16px; }
.live-day-date {
  font-family: var(--serif);
  font-size: 26px; font-weight: 600;
  color: var(--rose-deep);
  letter-spacing: 0.5px;
}
.live-day-meta { font-size: 13px; color: var(--ink-soft); }

.live-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 14px;
}

.live-shot {
  position: relative; display: block; width: 100%;
  padding: 0; border: 0; background: #fffdfb;
  border-radius: 12px; overflow: hidden; cursor: zoom-in;
  box-shadow: var(--shadow-sm);
  animation: live-pop 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}
.live-shot img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.live-shot:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.live-shot-offset {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 16px 10px 7px;
  font-size: 11px; color: rgba(255, 255, 255, 0.92);
  background: linear-gradient(transparent, rgba(67, 53, 63, 0.55));
  pointer-events: none;
}

@keyframes live-pop { from { opacity: 0; transform: translateY(14px); } }

/* 多张时堆成一摞：收起态显示牌堆，展开态显示网格 */
.live-shots[data-expanded="false"] .live-strip,
.live-shots[data-expanded="false"] .live-collapse { display: none; }
.live-shots[data-expanded="true"] .live-deck,
.live-shots[data-expanded="true"] .live-deck-hint { display: none; }

.live-deck {
  position: relative;
  height: 196px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.live-deck-card {
  position: absolute; top: 10px; left: 8px;
  width: 150px; aspect-ratio: 1 / 1;
  border-radius: 12px; overflow: hidden;
  background: #fffdfb;
  box-shadow: var(--shadow-sm);
  transform: rotate(calc((var(--k) - 1.5) * 5deg))
             translate(calc(var(--k) * 36px), calc(var(--k) * 4px - 6px));
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s ease;
}
.live-deck-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.live-deck:hover .live-deck-card, .live-deck:active .live-deck-card {
  transform: rotate(calc((var(--k) - 1.5) * 7.5deg))
             translate(calc(var(--k) * 50px), calc(var(--k) * 5px - 8px));
  box-shadow: var(--shadow-md);
}
.live-deck:focus-visible { outline: 2px solid var(--rose-deep); outline-offset: 4px; border-radius: 16px; }
.live-deck-count {
  position: absolute; top: 6px; right: 4px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--rose-deep); color: #fff;
  font-size: 12px; letter-spacing: 1px;
  box-shadow: var(--shadow-sm);
}
.live-deck-hint { margin-top: 8px; font-size: 12px; color: var(--ink-soft); }
.live-collapse {
  display: block; margin: 16px auto 0;
  padding: 7px 20px; border-radius: 999px;
  border: 1px solid rgba(67, 53, 63, 0.18); background: transparent;
  color: var(--ink-soft); font-size: 12px; cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.live-collapse:hover { color: var(--rose-deep); border-color: var(--rose-deep); }

@media (max-width: 720px) {
  .live-strip { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
  .live-day-date { font-size: 22px; }
  .live-days { gap: 34px; }
  .live-deck { height: 158px; }
  .live-deck-card { width: 116px; }
  .live-deck:hover .live-deck-card, .live-deck:active .live-deck-card {
    transform: rotate(calc((var(--k) - 1.5) * 7.5deg))
               translate(calc(var(--k) * 38px), calc(var(--k) * 5px - 8px));
  }
}

/* ---------------- 信 ---------------- */

.letter-card {
  max-width: 720px;
  margin: 0 auto;
  background:
    linear-gradient(180deg, rgba(245, 201, 214, 0.16), transparent 120px),
    var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: clamp(32px, 6vw, 60px);
  position: relative;
}

.letter-card::before {
  content: "❝";
  position: absolute; top: 18px; left: 26px;
  font-family: var(--serif);
  font-size: 44px;
  color: var(--rose-soft);
}

.letter-body {
  font-family: var(--serif);
  font-size: clamp(15px, 2.2vw, 17px);
  line-height: 2.1;
  white-space: pre-wrap;
  color: var(--ink);
  outline: none;
  border-radius: 10px;
  transition: box-shadow 0.25s ease;
}

.letter-body[contenteditable="true"] { box-shadow: 0 0 0 2px var(--rose-soft); padding: 12px; margin: -12px; }

.letter-actions { display: flex; justify-content: flex-end; margin-top: 28px; }

/* ---------------- 待开封的信封 ---------------- */
.envelope-stage {
  display: flex; flex-direction: column; align-items: center;
  padding-top: 8px;
}

.envelope {
  position: relative;
  width: min(340px, 78vw);
  aspect-ratio: 1.55;
  background: none; border: 0; padding: 0;
  cursor: pointer;
  perspective: 900px;
  animation: envFloat 4.5s ease-in-out infinite;
  transition: transform 0.45s ease;
}
.envelope:hover { transform: translateY(-5px); animation-play-state: paused; }
.envelope:focus-visible { outline: 2px solid var(--rose-soft); outline-offset: 10px; border-radius: 14px; }
.envelope-stage.opening .envelope { animation: none; }

@keyframes envFloat {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -7px; }
}

/* 信封底衬 */
.envelope::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(160deg, #fdf4ee, #f9e6e0);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

/* 探出的信纸（先从底部抽出，再随卡片展开） */
.env-paper {
  position: absolute; left: 9%; right: 9%; top: 12%; bottom: 16%;
  z-index: 1;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(120, 70, 60, 0.08);
  transition: transform 0.55s ease 0.55s;
}
.env-paper::after {
  content: "";
  position: absolute; left: 14%; right: 14%; top: 24%; height: 36%;
  background: repeating-linear-gradient(180deg, rgba(190, 140, 130, 0.35) 0 2px, transparent 2px 12px);
}
.envelope-stage.opening .env-paper { transform: translateY(-52%); }

/* 前袋（遮住信纸下半部） */
.env-pocket {
  position: absolute; inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, #fbeee7, #f5ded6);
  border-radius: 12px;
  clip-path: polygon(0 0, 50% 56%, 100% 0, 100% 100%, 0 100%);
}

/* 上盖（拆封时向上翻起） */
.env-flap {
  position: absolute; left: 0; right: 0; top: 0; height: 56%;
  z-index: 4;
  background: linear-gradient(180deg, #f7dfd5, #f1cdc1);
  clip-path: polygon(0 0, 50% 100%, 100% 0);
  border-radius: 12px 12px 0 0;
  transform-origin: top center;
  transition: transform 0.6s ease 0.15s;
}
.envelope-stage.opening .env-flap { transform: rotateX(180deg); }

/* 封蜡 */
.env-seal {
  position: absolute; left: 50%; top: 47%;
  z-index: 5;
  width: 52px; height: 52px;
  display: grid; place-items: center;
  color: #fff1ec; font-size: 20px;
  background: radial-gradient(circle at 35% 30%, #e0969e, #c05068 72%);
  border-radius: 50%;
  box-shadow: 0 3px 10px rgba(180, 80, 100, 0.35), inset 0 1px 2px rgba(255, 255, 255, 0.45);
  transform: translate(-50%, -50%);
  transition: transform 0.35s ease, opacity 0.35s ease;
}
.envelope-stage.opening .env-seal {
  transform: translate(-50%, -50%) scale(0.15) rotate(60deg);
  opacity: 0;
}

.env-hint {
  margin-top: 28px;
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.14em;
  color: var(--ink);
  transition: opacity 0.3s ease;
}
.envelope-stage.opening .env-hint { opacity: 0; }

.env-note { margin-top: 8px; font-size: 12.5px; color: var(--ink-soft); }

/* 信纸展开动效 */
.letter-card.unfold {
  transform-origin: top center;
  animation: letterUnfold 0.95s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}
@keyframes letterUnfold {
  0% { transform: perspective(1100px) rotateX(-72deg) translateY(-36px) scale(0.96); opacity: 0; }
  55% { opacity: 1; }
  100% { transform: perspective(1100px) rotateX(0) translateY(0) scale(1); opacity: 1; }
}

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

.footer {
  position: relative; z-index: 2;
  text-align: center;
  padding: 60px 24px 70px;
  border-top: 1px solid var(--hairline);
  color: var(--ink-soft);
  font-size: 14px;
  letter-spacing: 0.1em;
}

.footer-sub { font-size: 12px; margin-top: 8px; opacity: 0.75; letter-spacing: 0.05em; }

.heart { color: var(--rose); animation: beat 1.4s ease-in-out infinite; display: inline-block; }

@keyframes beat { 0%, 100% { transform: scale(1); } 25% { transform: scale(1.25); } }

/* ---------------- 弹窗 / 表单 ---------------- */

.overlay {
  position: fixed; inset: 0;
  z-index: 100;
  display: grid; place-items: center;
  padding: 24px;
  background: rgba(67, 53, 63, 0.35);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn { from { opacity: 0; } }

.modal {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 48px);
  max-height: calc(100svh - 48px);
  overflow-y: auto;
  background: var(--card);
  border-radius: 24px;
  padding: 34px 34px 30px;
  box-shadow: var(--shadow-lg);
  animation: pop 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes pop { from { transform: translateY(18px) scale(0.97); opacity: 0; } }

.modal-title {
  font-family: var(--serif); font-weight: 600;
  font-size: 22px; letter-spacing: 0.08em;
  margin-bottom: 22px;
}

.modal-close {
  position: absolute; top: 18px; right: 18px;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close:hover { background: var(--rose); border-color: var(--rose); color: #fff; }

.field { display: block; margin-bottom: 18px; }

.field-row { display: flex; gap: 16px; }
.field-row .field { flex: 1; }
.field-grow { flex: 2; }

.field-name {
  display: block;
  font-size: 13px; letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-bottom: 7px;
}

.field input[type="text"], .field input[type="date"], .field textarea {
  width: 100%;
  font-family: var(--sans); font-size: 15px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  resize: vertical;
}

.field input:focus, .field textarea:focus {
  border-color: var(--rose-soft);
  box-shadow: 0 0 0 3px rgba(217, 96, 126, 0.13);
}

.upload-zone {
  border: 1.5px dashed var(--rose-soft);
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  background: rgba(217, 96, 126, 0.03);
}

.upload-zone:hover, .upload-zone.drag { background: rgba(217, 96, 126, 0.08); border-color: var(--rose); }

.upload-hint { color: var(--ink-soft); font-size: 13.5px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.upload-icon { font-size: 24px; color: var(--rose-soft); }

.upload-preview { max-height: 180px; max-width: 100%; border-radius: 10px; box-shadow: var(--shadow-sm); }

/* ---------------- 灯箱 ---------------- */

.lightbox {
  position: fixed; inset: 0;
  z-index: 120;
  background: rgba(35, 24, 30, 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 40px;
  animation: fadeIn 0.25s ease;
}

.lightbox-stage img, .lightbox-stage .polaroid-art {
  max-width: min(90vw, 900px);
  max-height: 74vh;
  width: auto; height: auto;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.lightbox-stage .polaroid-art { width: min(80vw, 600px); aspect-ratio: 4 / 5; }

.lightbox-caption {
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--serif);
  font-size: 15px; letter-spacing: 0.08em;
}

.lightbox-close {
  position: absolute; top: 22px; right: 26px;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: #fff; font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

/* ---------------- Toast ---------------- */

.toast {
  position: fixed; left: 50%; bottom: 40px;
  transform: translateX(-50%);
  z-index: 200;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  padding: 11px 26px;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } }

/* ---------------- 滚动入场动效 ---------------- */

/* 仅在脚本确认加载后（html.js）才先隐藏再入场；脚本失败时内容始终可见 */
html.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

html.js .reveal.in { opacity: 1; transform: none; }

/* 心形粒子 */
.spark {
  position: fixed;
  z-index: 300;
  font-size: 14px;
  pointer-events: none;
  animation: spark 1s ease-out forwards;
}

@keyframes spark {
  to { transform: translate(var(--dx), var(--dy)) scale(1.6); opacity: 0; }
}

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

@media (max-width: 920px) {
  .masonry { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 28px 18px; }
}

@media (max-width: 720px) {
  .nav-links { gap: 18px; }
  .brand-text { display: none; }

  .tl::before { left: 8px; }
  .tl-item, .tl-item:nth-child(even) {
    width: 100%; left: 0;
    padding: 0 0 40px 34px;
    text-align: left;
  }
  .tl-item:nth-child(odd) { text-align: left; }
  .tl-item:nth-child(odd) .tl-dot, .tl-item:nth-child(even) .tl-dot { left: 2.5px; right: auto; }
  .tl-item:nth-child(odd) .tl-del, .tl-item:nth-child(even) .tl-del { right: 10px; left: auto; }

  .stats { flex-wrap: wrap; gap: 24px; padding: 34px 20px; }
  .stat-divider { display: none; }

  .field-row { flex-direction: column; gap: 0; }

  .modal { padding: 26px 22px; }
}

@media (max-width: 480px) {
  .masonry { grid-template-columns: repeat(2, 1fr); gap: 24px 14px; }
  .polaroid figcaption { padding: 8px 4px 12px; }
  .polaroid .p-title { font-size: 12.5px; }
}

/* ================================================================
   云端共创版新增组件（身份 / 新时间线卡 / 小事清单 / 黑胶播放器 / 弹窗扩展）
   ================================================================ */

/* ---------------- 身份按钮 & 离线提示 ---------------- */

.identity-pill {
  border: 1.5px solid var(--rose-soft);
  background: rgba(255, 252, 248, 0.8);
  color: var(--rose-deep);
  border-radius: 999px;
  padding: 7px 18px;
  font-size: 13px;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.identity-pill:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }

.identity-pill.on {
  background: var(--grad-rose);
  color: #fff;
  border-color: transparent;
}

.offline-bar {
  position: fixed; top: 62px; left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  background: var(--ink);
  color: #fff;
  font-size: 12.5px;
  padding: 8px 20px;
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  white-space: nowrap;
}

.offline-bar code { color: var(--rose-soft); }

/* ---------------- 时间线卡片（共同版） ---------------- */

.tl-item:nth-child(odd), .tl-item:nth-child(even) { text-align: left; }

.tl-item { animation: tlIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) backwards; }

@keyframes tlIn {
  from { opacity: 0; transform: translateY(18px); }
}

.tl-card { display: block; max-width: 520px; padding: 18px 22px 14px; }

.tl-card.from-wish { border-color: rgba(217, 96, 126, 0.25); background: #fff; }
.tl-card.from-wish::before {
  content: "✨";
  position: absolute; top: -10px; left: 18px;
  font-size: 16px;
}

.tl-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin-bottom: 6px;
}

.tl-date { margin: 0; }

.tl-day, .tl-fuzzy {
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(201, 163, 94, 0.13);
  color: var(--gold);
  letter-spacing: 0.04em;
}

.tl-fuzzy { background: rgba(138, 120, 131, 0.12); color: var(--ink-soft); }

.tl-actions { margin-left: auto; display: flex; gap: 6px; }

.tl-edit, .tl-del {
  position: static;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: var(--card);
  color: var(--ink-soft);
  font-size: 12px;
  cursor: pointer;
  opacity: 0;
  transition: all 0.25s ease;
  flex: none;
}

.tl-edit:hover { color: var(--rose-deep); border-color: var(--rose-soft); }
.tl-del:hover { color: #fff; background: var(--rose); border-color: var(--rose); }
.tl-card:hover .tl-edit, .tl-card:hover .tl-del { opacity: 1; }

.tl-del.armed, .wish-del.armed, .track-del.armed {
  opacity: 1 !important;
  width: auto;
  padding: 0 9px;
  border-radius: 13px;
  background: var(--rose);
  border-color: var(--rose);
  color: #fff;
  font-size: 11px;
  white-space: nowrap;
}

.tl-title {
  font-family: var(--serif); font-weight: 600;
  font-size: 17.5px; letter-spacing: 0.02em;
  margin-bottom: 5px;
}

.tl-content { font-size: 14.5px; color: var(--ink-soft); word-break: break-word; }

.tl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 10px; }

.tl-loc { font-size: 12.5px; color: var(--ink-soft); letter-spacing: 0.02em; }

.mood {
  font-size: 11.5px;
  padding: 2px 10px;
  border-radius: 999px;
  letter-spacing: 0.03em;
}

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

.tl-photos:has(> :nth-child(1):last-child) { grid-template-columns: minmax(0, 70%); }

.tl-photo {
  padding: 0; border: 0; background: none;
  border-radius: 10px; overflow: hidden;
  aspect-ratio: 1;
  cursor: zoom-in;
  box-shadow: var(--shadow-sm);
}

.tl-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s ease; }
.tl-photo:hover img { transform: scale(1.05); }

.tl-byline {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--hairline);
  font-size: 11.5px;
  color: var(--ink-soft);
  letter-spacing: 0.03em;
}

.tl-byline em { font-style: normal; opacity: 0.85; }

.wish-link { cursor: pointer; color: var(--rose-deep); }

.tl-item.flash .tl-card, .wish-item.flash {
  animation: flashBg 1.6s ease;
}

@keyframes flashBg {
  0%, 55% { box-shadow: 0 0 0 3px rgba(217, 96, 126, 0.35), var(--shadow-md); }
  100% { box-shadow: var(--shadow-sm); }
}

.tl-empty, .wish-empty, .track-empty, .wall-empty { list-style: none; }

/* ---------------- 新增回忆弹窗：时间分段 / 心情 / 多图 ---------------- */

.segmented {
  display: inline-flex;
  background: var(--bg-soft);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
  margin-bottom: 10px;
}

.seg {
  border: 0;
  background: transparent;
  padding: 6px 15px;
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.03em;
}

.seg.on {
  background: var(--card);
  color: var(--rose-deep);
  box-shadow: var(--shadow-sm);
  font-weight: 500;
}

.field .dt { margin-bottom: 0; }

.mood-picker { display: flex; flex-wrap: wrap; gap: 8px; }

.mood-custom { display: flex; gap: 8px; margin-top: 10px; align-items: stretch; }
.mood-custom input { flex: 1; }
.mood-custom .btn-sm { flex: none; white-space: nowrap; }
.mood-chip.custom { border-style: dashed; }

.mood-chip {
  padding: 6px 15px;
  border-radius: 999px;
  border: 1.5px solid var(--hairline);
  background: var(--bg-soft);
  color: var(--ink-soft);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mood-chip.on {
  background: var(--mbg);
  color: var(--mfg);
  border-color: var(--mfg);
  font-weight: 500;
  transform: translateY(-1px);
}

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
  gap: 10px;
  width: 100%;
  margin-bottom: 8px;
}

.thumb-grid:empty { margin-bottom: 0; }

.thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

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

.thumb-del {
  position: absolute; top: 4px; right: 4px;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 0;
  background: rgba(67, 53, 63, 0.68);
  color: #fff;
  font-size: 10px;
  cursor: pointer;
}

.upload-zone { position: relative; }
.upload-zone-slim { padding: 22px 16px; }

.audio-done {
  display: flex; align-items: center; gap: 10px;
  color: var(--rose-deep);
  font-size: 13.5px;
}

/* ---------------- 想一起做的小事 ---------------- */

.wish-board {
  max-width: 720px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 26px 30px 20px;
}

.wish-add { display: flex; gap: 10px; margin-bottom: 10px; }

.wish-add input {
  flex: 1;
  border: 1.5px solid var(--hairline);
  border-radius: 12px;
  background: var(--bg-soft);
  padding: 10px 15px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.wish-add input:focus {
  outline: none;
  border-color: var(--rose-soft);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(217, 96, 126, 0.12);
}


.wish-list { list-style: none; }

.wish-item {
  display: flex; align-items: flex-start; gap: 13px;
  padding: 12px 6px;
  border-top: 1px dashed var(--hairline);
  border-radius: 10px;
  transition: background 0.2s ease;
}

.wish-item:first-child { border-top: 0; }
.wish-item:hover { background: rgba(217, 96, 126, 0.04); }

.wish-check {
  flex: none;
  width: 25px; height: 25px;
  margin-top: 2px;
  border-radius: 50%;
  border: 2px solid var(--rose-soft);
  background: transparent;
  cursor: pointer;
  display: grid; place-items: center;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.wish-check svg {
  width: 13px; height: 13px;
  stroke: #fff; stroke-width: 3;
  fill: none; stroke-linecap: round; stroke-linejoin: round;
  opacity: 0;
  transition: opacity 0.2s ease 0.05s;
}

.wish-item.done .wish-check { background: var(--grad-rose); border-color: transparent; }
.wish-item.done .wish-check svg { opacity: 1; }

.wish-main { flex: 1; min-width: 0; }

.wish-text { font-size: 15px; line-height: 1.55; transition: all 0.3s ease; }

.wish-item.done .wish-text { color: var(--ink-soft); text-decoration: line-through; text-decoration-color: var(--rose-soft); }

.wish-meta { font-size: 11.5px; color: var(--ink-soft); margin-top: 2px; letter-spacing: 0.02em; }

.wish-jump {
  border: 0; background: none;
  color: var(--rose-deep);
  font-size: 11.5px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0 0 0 4px;
}

.wish-del {
  flex: none;
  width: 24px; height: 24px;
  margin-top: 2px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-soft);
  font-size: 11px;
  cursor: pointer;
  opacity: 0;
  transition: all 0.25s ease;
}

.wish-item:hover .wish-del { opacity: 1; }
.wish-del:hover { color: #fff; background: var(--rose); }

/* ---------------- 唱给妍 · 黑胶播放器 ---------------- */

.record-player {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 38px;
  align-items: center;
  max-width: 840px;
  margin: 0 auto 36px;
  background: linear-gradient(165deg, #fffdf9 0%, #fdf6ef 55%, #fbeeea 100%);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 34px 36px;
}

.turntable { display: flex; justify-content: center; }

.disc {
  position: relative;
  width: 210px; height: 210px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.10), transparent 45%),
    repeating-radial-gradient(circle, #211a1f 0px, #2c232a 2px, #1e181d 4px);
  box-shadow: var(--shadow-lg), inset 0 0 26px rgba(0, 0, 0, 0.45);
}

/* 静止高光：叠在旋转盘面上，营造反光质感 */
.disc-sheen {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.16) 0%, transparent 34%, transparent 64%, rgba(255, 255, 255, 0.06) 100%);
  pointer-events: none;
}

.disc.spin { animation: discSpin 3.6s linear infinite; }

@keyframes discSpin { to { transform: rotate(360deg); } }

.disc-label {
  position: absolute; inset: 29%;
  border-radius: 50%;
  background: var(--grad-rose);
  display: grid; place-items: center;
  color: #fff;
  font-size: 21px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.disc-hole {
  position: absolute; left: 50%; top: 50%;
  width: 11px; height: 11px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--bg);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.player { min-width: 0; }

.now-title {
  font-family: var(--serif); font-weight: 600;
  font-size: 21px; letter-spacing: 0.02em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.now-sub { font-size: 12.5px; color: var(--ink-soft); margin-top: 3px; }

.now-note {
  font-size: 12.5px;
  color: var(--rose-deep);
  background: rgba(217, 96, 126, 0.08);
  border-left: 2px solid var(--rose-soft);
  padding: 7px 12px;
  border-radius: 0 10px 10px 0;
  margin-top: 10px;
}

.progress-row {
  display: flex; align-items: center; gap: 12px;
  margin-top: 18px;
}

.time { font-size: 11px; color: var(--ink-soft); font-variant-numeric: tabular-nums; min-width: 34px; }

/* 自定义进度条：--p 由 JS 同步为播放百分比，形成玫瑰色填充 */
input.seek {
  -webkit-appearance: none; appearance: none;
  flex: 1; height: 5px; border-radius: 99px; cursor: pointer;
  background: linear-gradient(90deg, #e8839b, var(--rose-deep) var(--p, 0%), rgba(67, 53, 63, 0.13) var(--p, 0%));
}
input.seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px; height: 13px; border-radius: 50%;
  background: #fff; border: 2.5px solid var(--rose);
  box-shadow: 0 1px 5px rgba(217, 96, 126, 0.45);
  transition: transform 0.15s ease;
}
input.seek::-webkit-slider-thumb:hover { transform: scale(1.3); }
input.seek::-moz-range-thumb {
  width: 13px; height: 13px; border-radius: 50%;
  background: #fff; border: 2.5px solid var(--rose);
  box-shadow: 0 1px 5px rgba(217, 96, 126, 0.45);
}

.controls {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-top: 20px;
}

.ctl {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.22s ease;
}
.ctl svg { width: 16px; height: 16px; fill: currentColor; }

.ctl:hover {
  border-color: var(--rose-soft); color: var(--rose-deep); background: #fff;
  transform: translateY(-1px); box-shadow: 0 4px 12px rgba(217, 96, 126, 0.16);
}

.ctl-play {
  width: 56px; height: 56px;
  background: var(--grad-rose);
  border: 0; color: #fff;
  box-shadow: 0 10px 24px rgba(217, 96, 126, 0.38);
}
.ctl-play svg { width: 22px; height: 22px; }
.ctl-play:hover { color: #fff; background: var(--grad-rose); transform: translateY(-2px) scale(1.05); box-shadow: 0 14px 30px rgba(217, 96, 126, 0.45); }

.ctl-toggle.on { background: var(--rose-soft); color: var(--rose-deep); border-color: transparent; }

/* 音量：胶囊容器，细滑条 */
.volume {
  display: flex; align-items: center; gap: 2px; margin-left: 14px;
  padding: 3px 12px 3px 4px; border-radius: 99px;
  background: rgba(255, 255, 255, 0.6); border: 1px solid var(--hairline);
}
.ctl-sm { width: 30px; height: 30px; border: 0; background: transparent; }
.ctl-sm svg { width: 15px; height: 15px; }
.ctl-sm:hover { border: 0; background: transparent; box-shadow: none; transform: none; color: var(--rose-deep); }
.ctl-sm.off { opacity: 0.4; }

input.vol {
  -webkit-appearance: none; appearance: none;
  width: 64px; height: 4px; border-radius: 99px; cursor: pointer;
  background: linear-gradient(90deg, var(--rose) var(--pv, 80%), rgba(67, 53, 63, 0.13) var(--pv, 80%));
}
input.vol::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px; height: 10px; border-radius: 50%;
  background: #fff; border: 2px solid var(--rose);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
input.vol::-moz-range-thumb {
  width: 10px; height: 10px; border-radius: 50%;
  background: #fff; border: 2px solid var(--rose);
}

.track-list {
  list-style: none;
  max-width: 760px;
  margin: 0 auto;
}

.track-item {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  transition: all 0.22s ease;
}

.track-item:hover { background: rgba(217, 96, 126, 0.06); }

.track-item.playing {
  background: rgba(217, 96, 126, 0.09);
  border-color: rgba(217, 96, 126, 0.22);
}

.track-play {
  flex: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: var(--card);
  color: var(--rose-deep);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.track-play svg { width: 13px; height: 13px; fill: currentColor; }
.track-item.playing .track-play { background: var(--grad-rose); color: #fff; border-color: transparent; }

.track-main { flex: 1; min-width: 0; }

.track-title {
  font-family: var(--serif); font-weight: 500;
  font-size: 15px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.track-sub { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11.5px; color: var(--ink-soft); margin-top: 1px; }

.track-sub .singer { color: var(--rose-deep); }

.track-dur { font-size: 11.5px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

.track-del {
  flex: none;
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-soft);
  font-size: 11px;
  cursor: pointer;
  opacity: 0;
  transition: all 0.22s ease;
}

.track-item:hover .track-del { opacity: 1; }
.track-del:hover { color: #fff; background: var(--rose); }

/* ---------------- 身份登录弹窗 ---------------- */

.modal-slim { max-width: 430px; }

.login-tip { font-size: 13px; color: var(--ink-soft); margin: -6px 0 14px; }

.who-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }

.who-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 16px 10px;
  border-radius: 16px;
  border: 1.5px solid var(--hairline);
  background: var(--bg-soft);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.who-btn:hover { border-color: var(--rose); background: rgba(217, 96, 126, 0.07); transform: translateY(-2px); box-shadow: var(--shadow-sm); }

.who-btn.on { border-color: var(--rose); background: rgba(217, 96, 126, 0.10); }

.who-name { font-family: var(--serif); font-weight: 600; font-size: 17px; color: var(--ink); }

.who-tag { font-size: 11px; letter-spacing: 0.14em; color: var(--ink-soft); }

.login-footer { margin-top: 14px; display: flex; justify-content: center; gap: 10px; }

/* ---------------- 信件编辑 ---------------- */

.letter-edit {
  width: 100%;
  border: 0;
  outline: none;
  resize: vertical;
  background: transparent;
  font-family: var(--serif);
  font-size: 16px;
  line-height: 2;
  color: var(--ink);
}

/* ---------------- 心形迸发 ---------------- */

.burst-heart {
  position: fixed;
  z-index: 300;
  font-size: 15px;
  color: var(--rose);
  pointer-events: none;
  animation: heartFly 1.2s ease-out forwards;
}

@keyframes heartFly {
  to { transform: translate(var(--dx), var(--dy)) scale(1.5); opacity: 0; }
}

/* ---------------- 新组件响应式 ---------------- */

@media (max-width: 720px) {
  .identity-pill { padding: 6px 12px; font-size: 12px; }

  .record-player { grid-template-columns: 1fr; gap: 24px; padding: 26px 20px; }
  .disc { width: 170px; height: 170px; }
  /* 窄屏堆叠时整体居中，避免盘居中标题左吊 */
  .player { text-align: center; }
  .progress-row { justify-content: center; }
  .now-note { text-align: left; }
  .volume { margin-left: 6px; }

  .wish-board { padding: 20px 18px 16px; }
  .wish-add { flex-wrap: wrap; }

  .who-grid { grid-template-columns: 1fr; }

  .tl-photos { grid-template-columns: repeat(3, 1fr); }

  .offline-bar {
    white-space: normal;
    width: calc(100% - 32px);
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html.js .reveal { opacity: 1; transform: none; }
  .tl-item { animation: none; }
  .disc.spin { animation: none; }
}
