/* ============================================================
   我们的相册 —— 暖白胶片感
   ============================================================ */

:root {
  --paper: #f4eee1;
  --paper-deep: #eae0cd;
  --card: #fffdf7;
  --ink: #322a22;
  --ink-2: #6d6154;
  --ink-3: #a1937f;
  --line: rgba(50, 42, 34, 0.13);
  --line-strong: rgba(50, 42, 34, 0.24);
  --accent: #a45f38;
  --accent-soft: rgba(164, 95, 56, 0.1);
  --accent-ink: #8d4f2c;
  --danger: #a8402f;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(60, 46, 30, 0.07);
  --shadow: 0 2px 6px rgba(60, 46, 30, 0.07), 0 14px 32px -18px rgba(60, 46, 30, 0.4);
  --serif: Georgia, "Times New Roman", "Songti SC", SimSun, serif;
  --sans: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  /* 暖色渐层：胶片橙 → 玫瑰 → 琥珀，用来做光晕与渐变字 */
  --grad-warm: linear-gradient(118deg, #8e4a26 0%, #c9743f 32%, #d94f70 68%, #e0a34a 100%);
  /* 天数用的渐层：色域收窄一点，长串数字才不会像红绿灯 */
  --grad-day: linear-gradient(100deg, #a4542a 0%, #bf7040 34%, #bf5b60 68%, #c98a52 100%);
  --glow-warm: radial-gradient(circle, rgba(226, 148, 92, 0.55), rgba(217, 79, 112, 0.18) 45%, transparent 72%);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 纸张纹理 + 角落的暖光，整体不那么平 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1100px 520px at 12% -8%, rgba(255, 252, 244, 0.9), transparent 60%),
    radial-gradient(900px 460px at 92% 4%, rgba(214, 186, 148, 0.24), transparent 62%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml;charset=utf-8,%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)'/%3E%3C/svg%3E");
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 96px;
}

/* ───────────────────────── 顶栏 ───────────────────────── */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 0 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  text-decoration: none;
  min-width: 0;
}

/* 超窄屏下让标题先省略，不要把按钮挤出去 */
.brand span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand .heart {
  color: var(--accent);
  font-size: 13px;
  transform: translateY(-1px);
}

.header-actions { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }

/* ───────────────────────── 按钮 ───────────────────────── */

.btn {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: background 0.18s, border-color 0.18s, transform 0.12s, color 0.18s;
  white-space: nowrap;
}

.btn:hover { background: #fffefa; border-color: var(--ink-3); }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff8f1;
  box-shadow: 0 6px 18px -10px rgba(164, 95, 56, 0.9);
}
.btn-primary:hover { background: #b06840; border-color: #b06840; }

.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: rgba(255, 253, 247, 0.7); border-color: var(--line); }

.btn-danger { color: var(--danger); }
.btn-danger:hover { background: rgba(168, 64, 47, 0.07); border-color: rgba(168, 64, 47, 0.35); }

.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ───────────────────────── 首屏 ───────────────────────── */

.hero {
  text-align: center;
  padding: 68px 0 54px;
}

/* ── 封面标题：一叠由小到大、由淡到浓的 love me ── */
.love-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  margin: 0 0 26px;
  position: relative;
  z-index: 1;
}

.love-line {
  display: block;
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: 0.14em;
  text-indent: 0.14em;
  white-space: nowrap;
}

.love-line:nth-child(1) { font-size: 13px; color: rgba(161, 147, 127, 0.62); }
.love-line:nth-child(2) { font-size: 18px; color: rgba(150, 130, 110, 0.76); }
.love-line:nth-child(3) { font-size: 25px; color: #b9786a; }
.love-line:nth-child(4) { font-size: 34px; color: #ab3d2e; letter-spacing: 0.1em; }

@media (max-width: 520px) {
  .love-line:nth-child(1) { font-size: 11px; }
  .love-line:nth-child(2) { font-size: 15px; }
  .love-line:nth-child(3) { font-size: 20px; }
  .love-line:nth-child(4) { font-size: 27px; }
  .love-stack { margin-bottom: 20px; }
}

.hero-eyebrow {
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 22px;
}

.hero-days {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  font-family: var(--serif);
  color: var(--ink);
}

.hero-days .prefix,
.hero-days .suffix {
  font-size: 15px;
  letter-spacing: 0.16em;
  color: var(--ink-2);
}

.hero-days .number {
  font-size: clamp(64px, 13vw, 112px);
  line-height: 0.92;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.hero-note {
  margin: 22px 0 0;
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
}

/* 胶片齿孔分隔线 */
.film-divider {
  position: relative;
  height: 22px;
  margin: 46px auto 0;
  max-width: 520px;
  background-image: radial-gradient(circle at 5px 11px, rgba(50, 42, 34, 0.16) 2.6px, transparent 3px);
  background-size: 22px 22px;
  background-repeat: repeat-x;
  opacity: 0.85;
  mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
}

/* 天数被指到时会亮起来一点，点下去有彩蛋 */
.hero-days { cursor: pointer; }

.hero-days .number {
  transition: filter 0.45s ease;
}

.hero-days:hover .number {
  filter: drop-shadow(0 8px 26px rgba(198, 108, 62, 0.32));
}

/* ───────────────────────── 区块标题 ───────────────────────── */

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 56px 0 22px;
}

.section-title {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.14em;
  margin: 0;
}

.section-sub {
  font-size: 12.5px;
  color: var(--ink-3);
  letter-spacing: 0.05em;
  margin: 6px 0 0;
}

/* ───────────────────────── 相册网格 ───────────────────────── */

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
}

.album-card {
  position: relative;
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.28s, border-color 0.28s;
}

.album-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--line-strong);
}

.album-cover {
  aspect-ratio: 4 / 3;
  background: var(--paper-deep);
  position: relative;
  overflow: hidden;
}

.album-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.album-card:hover .album-cover img { transform: scale(1.04); }

.album-cover-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--ink-3);
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.2em;
  background:
    linear-gradient(135deg, rgba(255, 253, 247, 0.75), rgba(234, 224, 205, 0.55)),
    repeating-linear-gradient(45deg, rgba(50, 42, 34, 0.03) 0 8px, transparent 8px 16px);
}

.album-body { padding: 14px 16px 16px; }

.album-name {
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 0.06em;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.album-meta {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  display: flex;
  gap: 8px;
  align-items: center;
}

.album-meta .dot { opacity: 0.5; }

/* 新建相册卡片 */
.album-card.is-new {
  display: grid;
  place-items: center;
  min-height: 240px;
  border-style: dashed;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  font-family: var(--sans);
}

.album-card.is-new:hover { background: rgba(255, 253, 247, 0.6); }

.album-card.is-new .inner { text-align: center; }
.album-card.is-new .plus { font-size: 26px; display: block; margin-bottom: 8px; color: var(--accent); }
.album-card.is-new .label { font-size: 13.5px; letter-spacing: 0.08em; }

/* ───────────────────────── 空状态 ───────────────────────── */

.empty {
  text-align: center;
  padding: 64px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 247, 0.45);
}

.empty svg { opacity: 0.5; margin-bottom: 14px; }

.empty h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 17px;
  letter-spacing: 0.1em;
  margin: 0 0 8px;
}

.empty p { margin: 0 0 22px; color: var(--ink-2); font-size: 13.5px; }

/* ───────────────────────── 相册页头部 ───────────────────────── */

.album-hero { padding: 42px 0 8px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-3);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.06em;
  transition: color 0.18s;
}
.back-link:hover { color: var(--accent-ink); }

.album-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.album-title {
  font-family: var(--serif);
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 400;
  letter-spacing: 0.04em;
  margin: 0;
  line-height: 1.25;
}

.album-desc {
  margin: 10px 0 0;
  color: var(--ink-2);
  font-size: 14px;
  max-width: 60ch;
}

.album-count {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  font-family: var(--serif);
}

/* ───────────────────────── 上传区 ───────────────────────── */

.uploader {
  margin: 30px 0 12px;
  padding: 26px 22px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 247, 0.55);
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
}

.uploader.is-drag { border-color: var(--accent); background: var(--accent-soft); }
.uploader.is-busy { opacity: 0.72; }

.uploader h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.1em;
  margin: 0 0 6px;
}

.uploader p { margin: 0 0 16px; font-size: 12.5px; color: var(--ink-3); }

.upload-progress {
  margin-top: 16px;
  height: 3px;
  background: rgba(50, 42, 34, 0.1);
  border-radius: 999px;
  overflow: hidden;
  display: none;
}

.upload-progress.is-on { display: block; }

.upload-progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.2s ease;
}

/* ───────────────────────── 照片墙 ───────────────────────── */

.photo-grid {
  column-count: 3;
  column-gap: 16px;
  margin-top: 26px;
}

@media (max-width: 860px) { .photo-grid { column-count: 2; } }
@media (max-width: 520px) { .photo-grid { column-count: 1; } }

.photo {
  break-inside: avoid;
  margin: 0 0 16px;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  cursor: zoom-in;
  box-shadow: var(--shadow-sm);
}

.photo img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.photo:hover img { transform: scale(1.025); }

.photo-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 30px 14px 12px;
  background: linear-gradient(transparent, rgba(24, 19, 15, 0.72));
  color: #fdf8f0;
  opacity: 0;
  transition: opacity 0.24s;
  pointer-events: none;
}

.photo:hover .photo-overlay { opacity: 1; }

.photo-overlay .t {
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.04em;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-overlay .d {
  font-size: 11.5px;
  letter-spacing: 0.1em;
  opacity: 0.75;
  margin-top: 3px;
  display: block;
}

.badge-cover {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.92);
  color: var(--accent-ink);
  border: 1px solid rgba(164, 95, 56, 0.28);
}

/* ───────────────────────── 灯箱 ───────────────────────── */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  background: rgba(26, 22, 18, 0.94);
  backdrop-filter: blur(6px);
  padding: 42px 24px 28px;
  overflow-y: auto;
}

.lightbox.is-open { display: flex; flex-direction: column; align-items: center; justify-content: center; }

.lightbox img {
  max-width: min(1100px, 94vw);
  max-height: 74vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9);
}

.lightbox-bar {
  margin-top: 20px;
  width: min(1100px, 94vw);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: #f0e7da;
  flex-wrap: wrap;
}

.lightbox-text { min-width: 0; }
.lightbox-text .t { font-family: var(--serif); font-size: 16px; letter-spacing: 0.05em; }
.lightbox-text .c { font-size: 13px; opacity: 0.72; margin-top: 4px; max-width: 62ch; }
.lightbox-text .d { font-size: 11.5px; opacity: 0.5; letter-spacing: 0.12em; margin-top: 6px; }

.lightbox-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.lightbox .btn {
  background: rgba(255, 253, 247, 0.08);
  border-color: rgba(253, 248, 240, 0.24);
  color: #f5ece0;
}

.lightbox .btn:hover { background: rgba(255, 253, 247, 0.16); }
.lightbox .btn-danger { color: #f0a99a; }

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 20px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(253, 248, 240, 0.22);
  background: rgba(255, 253, 247, 0.08);
  color: #f5ece0;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(255, 253, 247, 0.18); }

/* ───────────────────────── 对话框 ───────────────────────── */

dialog.sheet {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  color: var(--ink);
  padding: 0;
  width: min(460px, calc(100vw - 32px));
  box-shadow: 0 40px 90px -40px rgba(40, 30, 18, 0.7);
}

dialog.sheet::backdrop {
  background: rgba(40, 33, 25, 0.42);
  backdrop-filter: blur(3px);
}

.sheet-body { padding: 24px 24px 18px; }

.sheet h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 18px;
  letter-spacing: 0.08em;
  margin: 0 0 4px;
}

.sheet .hint { font-size: 12.5px; color: var(--ink-3); margin: 0 0 18px; }

.field { margin-bottom: 14px; }

.field label {
  display: block;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.field input,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  padding: 9px 12px;
  outline: none;
  transition: border-color 0.16s, box-shadow 0.16s;
}

.field textarea { resize: vertical; min-height: 76px; line-height: 1.6; }

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.sheet-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 24px 20px;
  border-top: 1px solid var(--line);
}

.sheet-actions .spacer { margin-right: auto; }

/* ───────────────────────── 提示 ───────────────────────── */

.toast-stack {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}

.toast {
  background: rgba(38, 31, 24, 0.94);
  color: #f7efe3;
  font-size: 13.5px;
  padding: 10px 18px;
  border-radius: 999px;
  box-shadow: 0 12px 30px -14px rgba(0, 0, 0, 0.8);
  animation: toast-in 0.24s ease both;
}

.toast.is-error { background: rgba(140, 46, 34, 0.96); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ───────────────────────── 其它 ───────────────────────── */

.loading {
  padding: 80px 0;
  text-align: center;
  color: var(--ink-3);
  font-family: var(--serif);
  letter-spacing: 0.2em;
  font-size: 13px;
}

.site-footer {
  margin-top: 72px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  font-family: var(--serif);
}

@media (max-width: 620px) {
  .page { padding: 0 16px 72px; }
  .hero { padding: 44px 0 36px; }
  .section-head { margin: 40px 0 18px; }
  .album-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
  .album-card.is-new { min-height: 160px; }
  .album-body { padding: 11px 12px 13px; }
  .album-name { font-size: 14.5px; }
  .photo-grid { column-gap: 12px; }
  .photo { margin-bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .fx-glow, .fx-burst, .hero-dust, .hero-aurora { display: none !important; }
  html.fx-ready .reveal { opacity: 1 !important; transform: none !important; }
}

/* ══════════════════════════════════════════════════════════════
   交互特效层 —— 所有效果都只在 transform / opacity 上做，且都能降级
   ══════════════════════════════════════════════════════════════ */

/* ── 跟随指针的暖光 ── */
.fx-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 640px;
  height: 640px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  filter: blur(30px);
  transition: opacity 0.7s ease;
  will-change: transform;
}

.fx-glow.is-on { opacity: 0.5; }

/* ── 心形迸发 ── */
.fx-burst {
  position: fixed;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 130;
}

.fx-heart {
  position: fixed;
  transform: translate(-50%, -50%);
  font-size: 14px;
  line-height: 1;
  opacity: 0;
  will-change: transform, opacity;
}

/* ── 首屏：极光 + 浮尘 ── */
.hero { position: relative; }

.hero-aurora {
  position: absolute;
  inset: -26% -14%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.3;
  background: conic-gradient(
    from 0deg,
    rgba(201, 116, 63, 0.3),
    rgba(224, 163, 74, 0.24),
    rgba(217, 120, 110, 0.22),
    rgba(190, 150, 96, 0.24),
    rgba(201, 116, 63, 0.3)
  );
  filter: blur(72px);
  animation: aurora-spin 34s linear infinite;
}

@keyframes aurora-spin {
  to { transform: rotate(360deg); }
}

.hero-dust {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.hero-eyebrow,
.hero-days,
.hero-note,
.film-divider { position: relative; z-index: 1; }

/* ── 数字滚轮 ── */
.hero-days .number {
  display: inline-flex;
  align-items: flex-start;
  font-variant-numeric: tabular-nums;
}

.odometer { display: inline-flex; align-items: flex-start; }

.odo-digit {
  display: inline-block;
  height: 1em;
  width: 0.6em;
  overflow: hidden;
  text-align: center;
}

.odo-track { display: block; will-change: transform; }

.odo-track > span {
  display: block;
  height: 1em;
  line-height: 1em;
}

/* 渐变字：只有支持 background-clip:text 才启用，不支持就保持纯色。
   滚轮模式下字形在深层子节点里，父级裁切不到，所以渐变落在每一行数字上。 */
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .hero-days .number:not(.odometer) {
    background: var(--grad-day);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  /* 整串共享一条渐变：每位只截取自己那一段，看起来才是连续过渡 */
  .hero-days .odo-track > span {
    background-image: var(--grad-day);
    background-size: var(--num-span, 200em) 100%;
    background-position: calc(var(--i, 0) * -0.6em) 0;
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

/* ── 滚动入场 ── */
html.fx-ready .reveal {
  opacity: 0;
  transform: translateY(16px);
}

html.fx-ready .reveal.is-in {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.75s cubic-bezier(0.2, 0.8, 0.3, 1) var(--delay, 0ms),
    transform 0.75s cubic-bezier(0.2, 0.8, 0.3, 1) var(--delay, 0ms);
}

/* ── 相册卡片：3D 倾斜 + 眩光 ── */
.album-card {
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.3, 1), box-shadow 0.32s, border-color 0.32s;
}

.album-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.32s ease;
  background: radial-gradient(
    260px circle at var(--gx, 50%) var(--gy, 50%),
    rgba(255, 224, 186, 0.42),
    rgba(255, 255, 255, 0) 62%
  );
}

.album-card:hover::after { opacity: 1; }

.album-card .album-cover img { will-change: transform; }

.album-card:hover .album-cover img {
  transform: scale(1.06) translateZ(12px);
}

/* 卡片底部一条暖色渐层，hover 时亮起来 */
.album-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  z-index: 4;
  background: var(--grad-warm);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.album-card:hover::before { transform: scaleX(1); }

/* ── 相册页：封面晕影背景 ── */
.album-backdrop {
  position: fixed;
  inset: -10%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  transition: opacity 1.4s ease;
  mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 72%);
}

.album-backdrop.is-on { opacity: 0.55; }

.album-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(46px) saturate(1.3) brightness(1.06);
  transform: scale(1.2);
  animation: ken-burns 30s ease-in-out infinite alternate;
}

@keyframes ken-burns {
  from { transform: scale(1.18) translate3d(-1%, 1%, 0); }
  to { transform: scale(1.3) translate3d(1%, -1%, 0); }
}

/* 相册标题用渐层描出一点点 */
.album-title {
  background: linear-gradient(104deg, #322a22 0%, #4a3728 55%, #8d4f2c 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .album-title { background: none; }
}

/* ── 照片墙 ── */
.photo {
  transition: box-shadow 0.35s ease, border-color 0.35s ease;
}

.photo:hover {
  box-shadow: 0 18px 40px -22px rgba(60, 40, 22, 0.55);
  border-color: var(--line-strong);
}

.photo::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(160deg, rgba(255, 226, 194, 0.22), transparent 46%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.photo:hover::after { opacity: 1; }

/* ── 灯箱：翻页 / 计数器 / 入场 ── */
.lightbox.is-open #lightbox-img {
  animation: lb-in 0.48s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

@keyframes lb-in {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(253, 248, 240, 0.24);
  background: rgba(28, 23, 18, 0.55);
  color: #f5ece0;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  backdrop-filter: blur(6px);
  transition: background 0.2s, transform 0.2s, opacity 0.2s;
  z-index: 95;
}

.lightbox-nav:hover { background: rgba(255, 253, 247, 0.22); }
.lightbox-nav[disabled] { opacity: 0.25; cursor: default; }
.lightbox-nav.prev { left: 18px; }
.lightbox-nav.next { right: 18px; }

.lightbox-counter {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: rgba(245, 236, 224, 0.7);
  z-index: 95;
  pointer-events: none;
}

@media (max-width: 720px) {
  .lightbox-nav { width: 40px; height: 40px; font-size: 17px; }
  .lightbox-nav.prev { left: 8px; }
  .lightbox-nav.next { right: 8px; }
  .lightbox-counter { top: 62px; }
}

/* ── 跨文档视口过渡（支持时页面切换是柔和溶解） ── */
@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.42s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.3, 1);
}

/* ── 主按钮：光扫过 ── */
.btn-primary {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.42) 48%, transparent 66%);
  transform: translateX(-120%);
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.btn-primary:hover::after { transform: translateX(120%); }

/* ── 两侧竖排字：左 me，右 love ── */
.side-rail {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 34px;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.4s ease;
  mask-image: linear-gradient(180deg, transparent 0%, #000 11%, #000 89%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 11%, #000 89%, transparent 100%);
}

.side-rail.is-ready { opacity: 1; }

.side-rail-left { left: 10px; }
.side-rail-right { right: 10px; }

.side-rail-track {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  will-change: transform;
  animation: rail-drift 96s linear infinite;
}

/* 两边反向流动，像两边各自在呼吸 */
.side-rail-right .side-rail-track { animation-direction: reverse; }

.rail-word {
  font-family: var(--serif);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  color: var(--ink-3);
  opacity: 0.72;
  user-select: none;
}

@keyframes rail-drift {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}

/* 视口窄了就没地方放，直接收起，别压到内容上 */
@media (max-width: 1200px) {
  .side-rail { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .side-rail-track { animation: none; }
}

/* ── 背景音乐开关 ── */
.music-toggle {
  position: fixed;
  right: 18px;
  bottom: 20px;
  z-index: 70;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(255, 253, 247, 0.86);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 22px -12px rgba(60, 40, 22, 0.55);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.music-toggle:hover { transform: translateY(-1px); background: #fffefa; border-color: var(--ink-3); }
.music-toggle:active { transform: translateY(0); }

.music-bars {
  display: flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 13px;
}

.music-bars i {
  display: block;
  width: 2px;
  height: 4px;
  border-radius: 1px;
  background: var(--ink-2);
  transition: height 0.25s ease, background 0.25s ease;
}

.music-toggle.is-playing .music-bars i {
  background: var(--accent-ink);
  animation: bar-bounce 1.05s ease-in-out infinite;
}

.music-toggle.is-playing .music-bars i:nth-child(2) { animation-delay: 0.16s; }
.music-toggle.is-playing .music-bars i:nth-child(3) { animation-delay: 0.32s; }

@keyframes bar-bounce {
  0%, 100% { height: 4px; }
  50% { height: 13px; }
}

/* 自动播放被拦时的提示气泡 */
.music-toggle.is-hinting::after {
  content: "点一下放音乐";
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  background: rgba(255, 253, 247, 0.94);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  box-shadow: 0 6px 16px -10px rgba(60, 40, 22, 0.6);
  animation: hint-float 2.6s ease-in-out infinite;
}

@keyframes hint-float {
  0%, 100% { transform: translateY(-50%) translateX(0); }
  50% { transform: translateY(-50%) translateX(-3px); }
}

@media (max-width: 520px) {
  .music-toggle { right: 12px; bottom: 14px; width: 38px; height: 38px; }
  .music-toggle.is-hinting::after { content: "点一下放歌"; font-size: 11px; padding: 4px 10px; }
}

