/* ==========================================================================
   个人相册 v3 — 视觉系统
   原则：照片主导。大图优先、留白清楚、动效克制。
   硬约束：照片一律 object-fit: contain（不裁切）、不加滤镜、不改色彩。
   ========================================================================== */

/* ---------- 1. 令牌 ---------- */

:root {
  --paper: #ffffff;
  --paper-2: #f2f2f4;
  --paper-3: #fafafc;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #86868b;

  --night: #000000;
  --night-2: #0b0b0d;
  --night-ink: #f5f5f7;
  --night-ink-2: #86868b;

  --accent: #0071e3;

  --line: rgba(0, 0, 0, 0.1);
  --line-soft: rgba(0, 0, 0, 0.06);
  --line-dark: rgba(255, 255, 255, 0.16);

  --stage: #0c0c0e;          /* 照片舞台：深色中性底，留边即画框（D-01） */
  --radius: 18px;
  --radius-sm: 8px;
  --radius-lg: 26px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "PingFang SC", "Helvetica Neue", Arial, sans-serif;

  --fs-hero: clamp(38px, 6.2vw, 88px);
  --fs-section: clamp(28px, 4.4vw, 58px);
  --fs-cta: clamp(30px, 5vw, 66px);
  --fs-card: clamp(20px, 2.4vw, 30px);
  --fs-lead: clamp(16px, 1.8vw, 21px);
  --fs-body: 15px;
  --fs-caption: 12px;

  --gap: 14px;
  --pad: 40px;
  --nav-h: 56px;

  --shadow-tile: 0 1px 2px rgba(0, 0, 0, 0.05), 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-lift: 0 2px 6px rgba(0, 0, 0, 0.07), 0 18px 44px rgba(0, 0, 0, 0.12);
}

/* ---------- 2. 基础 ---------- */

* { box-sizing: border-box; }

/* 任何显式 display 的元素也必须能被 hidden 关掉 */
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.lb-open,
body.story-open,
body.wall-open { overflow: hidden; }

img, video { max-width: 100%; }

button, input, select { font: inherit; color: inherit; }

h1, h2, h3, p { margin: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.section--dark :focus-visible,
.story :focus-visible,
.wall :focus-visible,
.lightbox :focus-visible { outline-color: #ffffff; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -64px;
  z-index: 400;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  transition: top 0.24s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ---------- 3. 导航 ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid transparent;
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.site-nav.is-scrolled {
  background: rgba(255, 255, 255, 0.86);
  border-bottom-color: var(--line-soft);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-nav { background: rgba(255, 255, 255, 0.96); }
}

.nav-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 var(--pad);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 30px;
}

.brand {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  flex: 0 0 auto;
}

.tabs { display: flex; gap: 22px; flex: 0 0 auto; }

.tab {
  padding: 4px 0;
  border: 0;
  border-bottom: 1.5px solid transparent;
  background: none;
  font-size: 13px;
  letter-spacing: 0.01em;
  color: var(--ink-2);
  cursor: pointer;
  transition: color 0.24s var(--ease), border-color 0.24s var(--ease);
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--ink); border-bottom-color: var(--ink); }

.nav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-action {
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.24s var(--ease), border-color 0.24s var(--ease), color 0.24s var(--ease);
}
.nav-action:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.nav-search { position: relative; display: block; }
.nav-search input {
  width: 190px;
  height: 32px;
  padding: 0 12px 0 32px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--paper-2);
  font-size: 13px;
  transition: background 0.24s var(--ease), border-color 0.24s var(--ease), width 0.3s var(--ease);
}
.nav-search input:focus {
  outline: none;
  width: 230px;
  background: #fff;
  border-color: var(--line);
}
.nav-search input::placeholder { color: var(--ink-3); }

.nav-search::before {
  content: "";
  position: absolute;
  left: 12px; top: 9px;
  width: 9px; height: 9px;
  border: 1.5px solid var(--ink-3);
  border-radius: 50%;
  pointer-events: none;
}
.nav-search::after {
  content: "";
  position: absolute;
  left: 21px; top: 19px;
  width: 6px; height: 1.5px;
  background: var(--ink-3);
  transform: rotate(45deg);
  transform-origin: left center;
  pointer-events: none;
}

/* ---------- 4. Hero ---------- */

.hero {
  position: relative;
  background: var(--paper);
}

.hero-stage {
  position: relative;
  width: 100%;
  height: min(92vh, calc(100vw / var(--hero-ratio, 1.5)));
  min-height: 340px;
  overflow: hidden;
  background: var(--stage);
}

.hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;   /* 不裁切（D-01） */
  display: block;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to top,
      rgba(0, 0, 0, 0.78) 0%,
      rgba(0, 0, 0, 0.42) 24%,
      rgba(0, 0, 0, 0) 60%);
}

.hero-copy {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0 clamp(24px, 5vw, 80px) clamp(30px, 4.6vw, 72px);
  color: #fff;
}

.eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.76);
}

.hero-copy h1 {
  margin: 18px 0 0;
  max-width: 18ch;
  font-size: var(--fs-hero);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1.02;
  text-wrap: balance;
}

.hero-subtitle {
  margin: 20px 0 0;
  max-width: 54ch;
  font-size: var(--fs-lead);
  font-weight: 400;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.82);
}

.hero-hint {
  position: absolute;
  right: clamp(24px, 5vw, 80px);
  bottom: clamp(30px, 4.6vw, 72px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.62);
}
.hero-hint-line {
  width: 1px;
  height: 42px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.7));
  animation: hint-drift 2.8s var(--ease-in-out) infinite;
}
@keyframes hint-drift {
  0%, 100% { transform: translateY(-4px); opacity: 0.45; }
  50% { transform: translateY(4px); opacity: 1; }
}

body.is-empty .hero-stage { display: none; }
body.is-empty .hero { padding: 120px 24px; text-align: center; }
body.is-empty .hero-copy { position: static; color: var(--ink); }

/* ---------- 5. 章节头 ---------- */

.section-head {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 var(--pad) clamp(26px, 3vw, 44px);
}

.section-head--row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.section-kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.section-kicker--dark { color: var(--night-ink-2); }

.section-title {
  margin: 12px 0 0;
  font-size: var(--fs-section);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.06;
  text-wrap: balance;
}

.photo-count {
  margin: 0 0 6px;
  font-size: var(--fs-caption);
  letter-spacing: 0.1em;
  color: var(--ink-3);
  white-space: nowrap;
}

/* ---------- 6. 精选 ---------- */

.featured {
  padding: clamp(72px, 10vw, 140px) 0 clamp(20px, 3vw, 40px);
}

.featured-stream {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--pad);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(44px, 6.5vw, 104px);
}

.feature-block {
  width: 100%;
  max-width: 1200px;
  margin: 0;
  cursor: zoom-in;
}
/* 竖图不铺满整幅，否则一张就吃掉一屏半 */
.feature-block.is-portrait { width: min(100%, 720px); }

.feature-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background-color: var(--paper-2);
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow-tile);
  transition: box-shadow 0.5s var(--ease);
}
.feature-block:hover .feature-frame { box-shadow: var(--shadow-lift); }

.feature-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.7s var(--ease);
}
.feature-frame img.is-loaded { opacity: 1; }

.feature-caption {
  margin-top: 20px;
  font-size: clamp(15px, 1.7vw, 20px);
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.feature-caption span {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink-2);
}

/* ---------- 7. 目录：工具条 ---------- */

.catalog {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 var(--pad) clamp(80px, 10vw, 140px);
  scroll-margin-top: calc(var(--nav-h) + 16px);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 4px 0 clamp(28px, 3.4vw, 46px);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.field select {
  height: 36px;
  min-width: 116px;
  padding: 0 30px 0 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background-color: var(--paper-2);
  font-size: 13px;
  cursor: pointer;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%),
                    linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 15px) 15px, calc(100% - 10px) 15px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  transition: border-color 0.24s var(--ease), background-color 0.24s var(--ease);
}
.field select:hover { border-color: var(--line); background-color: #ececee; }

.clear {
  height: 36px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color 0.24s var(--ease), color 0.24s var(--ease);
}
.clear:hover { border-color: var(--ink); color: var(--ink); }

.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 26px;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.24s var(--ease), border-color 0.24s var(--ease), color 0.24s var(--ease);
}
.back:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

.content { min-height: 40vh; }
.sentinel { height: 1px; }

/* ---------- 8. 年 / 月 / 编辑式行 ---------- */

.year-group { margin-bottom: clamp(56px, 7vw, 96px); }

.year {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0 0 clamp(24px, 3vw, 40px);
  font-size: clamp(30px, 4.4vw, 56px);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--ink);
}
.year span {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.16em;
  color: var(--ink-3);
}

.month-group { margin-bottom: clamp(34px, 4vw, 52px); }

.month {
  position: sticky;
  top: var(--nav-h);
  z-index: 20;
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 26px 0 12px;
  padding: 10px 0;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.justified > .month:first-child { margin-top: 0; }
.month span {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--ink-3);
}

.justified { display: block; width: 100%; }

.row {
  display: flex;
  gap: var(--gap);
  width: 100%;
  margin-bottom: var(--gap);
}
.row--center { justify-content: center; }
.row--feature { margin-block: clamp(10px, 1.8vw, 26px) calc(var(--gap) + clamp(10px, 1.8vw, 26px)); }

/* ---------- 9. 瓦片 ---------- */

.tile {
  position: relative;
  flex: 0 0 auto;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--paper-2);
  cursor: zoom-in;
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease);
}
.row--feature .tile { border-radius: 12px; }

.tile:hover { box-shadow: var(--shadow-lift); }
.tile:focus-visible { outline-offset: 3px; }

.tile-frame {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.tile img,
.tile video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;   /* 不裁切 */
}

.tile img {
  opacity: 0;
  transition: opacity 0.55s var(--ease);
}
.tile img.is-loaded { opacity: 1; }

.tile-video {
  position: absolute;
  inset: 0;
  background: transparent;
  animation: video-in 0.4s var(--ease) both;
}
@keyframes video-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.tile-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  font-size: 8px;
  line-height: 1;
  pointer-events: none;
}

/* ---------- 10. 相册 ---------- */

.album-section { padding: 0 0 clamp(60px, 8vw, 110px); }

.album-grid {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 2.6vw, 36px);
}

.album-card {
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}

.album-card .cover {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  background-color: var(--paper-2);
  background-position: center;
  background-size: cover;
  transition: box-shadow 0.45s var(--ease);
}
.album-card:hover .cover { box-shadow: var(--shadow-lift); }

.album-card .cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.6s var(--ease);
}
.album-card .cover img.is-loaded { opacity: 1; }

.album-card h3 {
  margin: 16px 0 2px;
  font-size: var(--fs-card);
  font-weight: 600;
  letter-spacing: -0.03em;
}
.album-card p {
  margin: 0;
  font-size: var(--fs-caption);
  letter-spacing: 0.1em;
  color: var(--ink-3);
}

/* ---------- 11. 深色章节 ---------- */

.section--dark {
  background: var(--night);
  color: var(--night-ink);
}

.cta {
  padding: clamp(80px, 11vw, 150px) var(--pad);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
#wall-cta { background: var(--night-2); }

.cta-inner {
  max-width: 1080px;
  margin: 0 auto;
}

.cta-title {
  margin: 20px 0 0;
  font-size: var(--fs-cta);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1.04;
  text-wrap: balance;
}

.cta-text {
  margin: 22px 0 0;
  max-width: 46ch;
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--night-ink-2);
}

.cta-button {
  margin-top: clamp(28px, 3.4vw, 44px);
  padding: 13px 30px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.24s var(--ease), background 0.24s var(--ease);
}
.cta-button:hover { transform: translateY(-1px); background: rgba(255, 255, 255, 0.86); }

.stats {
  padding: clamp(56px, 7vw, 96px) var(--pad);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.stats-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}
.stat strong {
  display: block;
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.stat span {
  display: block;
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--night-ink-2);
}

.site-footer {
  padding: 44px var(--pad) 56px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.site-footer p {
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--night-ink-2);
}
.site-footer .footer-note { margin-top: 10px; opacity: 0.68; }

/* ---------- 12. 灯箱 ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  flex-direction: column;
  background: #000;
  animation: lb-in 0.28s var(--ease) both;
}
@keyframes lb-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lb-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 22px 4px;
  flex: 0 0 auto;
}
.lb-counter {
  margin-right: auto;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.6);
  font-variant-numeric: tabular-nums;
}

.lb-btn {
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s var(--ease);
}
.lb-btn:hover { color: #fff; }
.lb-close { font-size: 32px; padding: 0 6px; }
.lb-zoom { font-size: 24px; padding: 0 10px; }
.lb-prev,
.lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  font-size: 46px;
  padding: 14px 16px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.6);
}
.lb-prev { left: 10px; }
.lb-next { right: 10px; }
.lb-prev:hover, .lb-next:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }

.lb-figure {
  flex: 1;
  min-height: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0 68px;
}
.lb-figure img,
.lb-figure video {
  display: block;
  max-width: 100%;
  /* 给下方的说明文字留出一行，否则会被挤掉 */
  max-height: calc(100% - 30px);
  object-fit: contain;
  transform-origin: center center;
}
.lb-figure img {
  transition: transform 0.24s var(--ease);
  cursor: grab;
  touch-action: none;
}
.lb-figure img.is-grabbing { cursor: grabbing; transition: none; }

.lb-meta {
  flex: 0 0 auto;
  margin-top: 14px;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.62);
  text-align: center;
}

.lb-bottom {
  flex: 0 0 auto;
  padding: 8px 22px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.lb-controls { display: flex; gap: 8px; }

.lb-play {
  padding: 7px 18px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  background: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
}
.lb-play:hover { border-color: #fff; color: #fff; }
.lb-play.is-on { background: rgba(255, 255, 255, 0.14); border-color: #fff; color: #fff; }

.lb-thumbs {
  display: flex;
  gap: 7px;
  max-width: 94vw;
  padding: 4px 2px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.24) transparent;
}
.lb-thumbs::-webkit-scrollbar { height: 6px; }
.lb-thumbs::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.22); border-radius: 99px; }

.lb-thumbs button {
  position: relative;
  flex: 0 0 auto;
  width: 50px;
  height: 50px;
  padding: 0;
  border: 1.5px solid transparent;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  cursor: pointer;
  opacity: 0.44;
  transition: opacity 0.22s var(--ease), border-color 0.22s var(--ease);
}
.lb-thumbs button.is-current { opacity: 1; border-color: rgba(255, 255, 255, 0.9); }
.lb-thumbs img { width: 100%; height: 100%; object-fit: contain; }

.thumb-play {
  position: absolute;
  right: 3px;
  bottom: 3px;
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 6px;
  line-height: 1;
}

/* ---------- 13. 故事模式 ---------- */

.story {
  position: fixed;
  inset: 0;
  z-index: 140;
  background: #000;
  color: #fff;
  animation: fade-in 0.4s var(--ease) both;
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.story-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.story-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s var(--ease-in-out);
  will-change: opacity;
}
.story-slide.is-active { opacity: 1; }

.story-slide img,
.story-slide video {
  width: 100%;
  height: 100%;
  object-fit: contain;   /* 不裁切，暗场留边 */
  display: block;
  opacity: 0;
  transition: opacity 0.8s var(--ease);
}
.story-slide.is-ready img,
.story-slide.is-ready video { opacity: 1; }

/* 从 96.5% 推到 100%：有动势，又始终不裁切 */
.story-slide.is-active img,
.story-slide.is-active video {
  animation: settle var(--kb, 9000ms) var(--ease) both;
}
@keyframes settle {
  from { transform: scale(0.965); }
  to { transform: scale(1); }
}

.story-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 40px;
  text-align: center;
  background: radial-gradient(circle at 50% 46%, rgba(255, 255, 255, 0.09), transparent 62%), #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s var(--ease);
}
.story-card.is-visible { opacity: 1; }

.story-card-index {
  font-size: clamp(56px, 12vw, 132px);
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 1;
  color: rgba(255, 255, 255, 0.16);
  font-variant-numeric: tabular-nums;
}

.story-card-title {
  font-size: clamp(34px, 7vw, 84px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.story-card-sub {
  font-size: 12px;
  letter-spacing: 0.24em;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
}

.story-end {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 40px;
  background: #000;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s var(--ease);
}
.story-end.is-visible { opacity: 1; pointer-events: auto; }

.story-end h2 {
  font-size: clamp(28px, 4.6vw, 56px);
  font-weight: 600;
  letter-spacing: -0.045em;
}
.story-end p {
  font-size: 12px;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.5);
}

.story-end-actions { display: flex; gap: 12px; margin-top: 12px; }
.story-end-actions button {
  padding: 12px 26px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: none;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.22s var(--ease), color 0.22s var(--ease), border-color 0.22s var(--ease);
}
.story-end-actions button:hover { background: #fff; color: #000; border-color: #fff; }

.story-bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 3;
  padding: 26px clamp(18px, 3vw, 40px) calc(20px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0));
  opacity: 1;
  transition: opacity 0.4s var(--ease);
}
.story.is-paused .story-bar { opacity: 1; }

.story-chapter {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.66);
  font-variant-numeric: tabular-nums;
}

.story-progress {
  height: 2px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
}
.story-progress-fill {
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: #fff;
  transition: width 0.5s var(--ease);
}

.story-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.story-btn {
  padding: 7px 15px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.story-btn:hover { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.5); }

/* ---------- 14. 照片墙 ---------- */

.wall {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: #000;
  color: #fff;
  cursor: none;
  animation: fade-in 0.6s var(--ease) both;
}
.wall.is-active { cursor: none; }
.wall.is-active:has(.wall-bar.is-visible) { cursor: default; }

.wall-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.wall-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.4s var(--ease-in-out);
  will-change: opacity;
}
.wall-slide.is-active { opacity: 1; }

.wall-slide img,
.wall-slide video {
  width: 100%;
  height: 100%;
  object-fit: contain;   /* 不裁切 */
  display: block;
  opacity: 0;
  transition: opacity 0.9s var(--ease);
}
.wall-slide.is-ready img,
.wall-slide.is-ready video { opacity: 1; }

.wall-slide.is-active img,
.wall-slide.is-active video {
  animation: settle var(--kb, 18000ms) linear both;
}

/* 夜间调光：叠一层遮罩，不改照片本身 */
.wall::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: #000;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}
.wall.is-night::after { opacity: 0.46; }

.wall-clock {
  position: absolute;
  left: clamp(24px, 4vw, 64px);
  bottom: clamp(28px, 5vw, 72px);
  z-index: 3;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.55);
  transition: opacity 0.6s var(--ease), transform 1s var(--ease);
}

.wall-time {
  font-size: clamp(46px, 8vw, 116px);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.94);
}
.wall-date {
  margin-top: 8px;
  font-size: clamp(12px, 1.4vw, 16px);
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.62);
}
.wall.is-night .wall-time { color: #ffce8a; }
.wall.is-night .wall-date { color: rgba(255, 206, 138, 0.6); }

.wall-hint {
  position: absolute;
  left: 50%;
  bottom: clamp(120px, 16vw, 200px);
  z-index: 4;
  transform: translateX(-50%);
  max-width: min(560px, 80vw);
  padding: 12px 20px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 12.5px;
  line-height: 1.5;
  text-align: center;
  color: rgba(255, 255, 255, 0.86);
}

.wall-bar {
  position: absolute;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  z-index: 5;
  transform: translate(-50%, 14px);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(18, 18, 20, 0.72);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.wall-bar.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.wall-btn {
  min-width: 38px;
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12.5px;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.wall-btn:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.wall-btn.is-on { background: rgba(255, 255, 255, 0.9); color: #000; }
.wall-exit { color: rgba(255, 255, 255, 0.6); }

.wall-field {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 6px;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.5);
}
.wall-field select {
  height: 28px;
  padding: 0 6px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}

/* ---------- 15. Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  z-index: 300;
  max-width: 88vw;
  padding: 11px 20px;
  border-radius: 999px;
  background: rgba(29, 29, 31, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-size: 13px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(12px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 16. 动效 ---------- */

/* IO 兜底路径 */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* CSS 滚动驱动：主路径 */
@supports (animation-timeline: view()) {
  .reveal--css {
    animation: rise both linear;
    animation-timeline: view();
    animation-range: entry 6% cover 32%;
  }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: none; }
}

/* 网格 → 灯箱共享元素 */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.34s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}
::view-transition-group(*) {
  animation-duration: 0.34s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- 17. 响应式 ---------- */

@media (min-width: 768px) { :root { --gap: 14px; } }
@media (min-width: 1024px) { :root { --gap: 16px; } }
@media (min-width: 1200px) { :root { --gap: 20px; } }

@media (max-width: 1100px) {
  :root { --pad: 28px; }
  .album-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-search input { width: 150px; }
  .nav-search input:focus { width: 180px; }
}

@media (max-width: 860px) {
  .hero-stage { max-height: 76vh; }
  .hero-hint { display: none; }
  .featured-stream { gap: 48px; }
  .stats-inner { grid-template-columns: 1fr; gap: 26px; }
}

@media (max-width: 720px) {
  :root { --pad: 18px; --fs-body: 14px; --nav-h: 52px; }

  .nav-inner {
    height: auto;
    min-height: var(--nav-h);
    flex-wrap: wrap;
    gap: 8px 14px;
    padding: 9px var(--pad);
  }
  .tabs { gap: 16px; }
  .nav-actions { width: 100%; margin-left: 0; gap: 6px; }
  .nav-action { height: 30px; padding: 0 11px; font-size: 12px; }
  /* 搜索框吃掉这一行的剩余宽度，别被挤成一小截 */
  .nav-search { order: 3; flex: 1 1 auto; min-width: 0; }
  .nav-search input { width: 100%; }
  .nav-search input:focus { width: 100%; }

  /* 手机上不设最小高度，让照片正好铺满一行，下方不留底色带 */
  .hero-stage { min-height: 0; }
  .hero-copy { padding: 0 var(--pad) 26px; }
  .hero-subtitle { font-size: 15px; }

  .section-head--row { align-items: flex-start; flex-direction: column; gap: 6px; }
  .photo-count { margin: 0; }

  .month { top: var(--nav-h); padding: 8px 0; }
  .row--feature { margin-block: 10px calc(var(--gap) + 10px); }

  .album-grid { grid-template-columns: 1fr; gap: 26px; }

  .lb-figure { padding: 0 12px; }
  .lb-prev, .lb-next { display: none; }
  .lb-thumbs button { width: 44px; height: 44px; }

  .story-controls { justify-content: center; }
  .story-bar { padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }

  .wall-clock { left: 18px; bottom: 86px; }
  .wall-bar {
    left: 12px; right: 12px;
    transform: translateY(14px);
    justify-content: center;
    flex-wrap: wrap;
    border-radius: 18px;
  }
  .wall-bar.is-visible { transform: translateY(0); }
  .wall-field { display: none; }
}

@media (max-width: 420px) {
  .wall-btn { min-width: 32px; padding: 0 8px; }
}

/* ---------- 18. 减少动效 ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal,
  .reveal--css { opacity: 1 !important; transform: none !important; animation: none !important; }

  .story-slide img,
  .story-slide video,
  .wall-slide img,
  .wall-slide video { animation: none !important; transform: none !important; }

  .hero-hint-line { animation: none !important; }
}
