/* ==========================================================================
   SLX Personal Archive — 极简电影感样式表
   黑底白字, serif 标题, 缓慢转场, 编辑级排版
   ========================================================================== */

:root {
  --bg: #0a0a0a;
  --bg-soft: #111111;
  --bg-card: rgba(255, 255, 255, 0.03);
  --fg: #f5f4f0;
  --fg-muted: #a8a5a0;
  --fg-quiet: #8a8782;
  --line: rgba(255, 255, 255, 0.12);
  --line-soft: rgba(255, 255, 255, 0.06);
  --accent: #d4a373;
  --ink-ivory: #EDE6D3;
  --ink-ivory-soft: rgba(237, 230, 211, 0.6);
  --ink-ivory-faint: rgba(237, 230, 211, 0.12);
  --article-ink: #eee7d8;
  --article-ink-muted: rgba(238, 231, 216, 0.68);
  --article-ink-quiet: rgba(238, 231, 216, 0.52);
  --article-rule: rgba(238, 231, 216, 0.16);
  --article-rule-soft: rgba(238, 231, 216, 0.08);
  --article-accent: #b79d68;
  --article-accent-text: rgba(183, 157, 104, 0.78);
  --article-accent-soft: rgba(183, 157, 104, 0.42);
  --article-accent-faint: rgba(183, 157, 104, 0.12);
  --serif: 'Noto Serif SC', 'Songti SC', 'STSong', 'SimSun', serif;
  --serif-cn: 'Noto Serif SC', 'Songti SC', 'STSong', 'SimSun', serif;
  --sans: 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Heiti SC', sans-serif;
  /* 修改导航栏字体只需要改这里。若使用非系统字体，记得先在 site-templates.js 加载字体文件。 */
  --nav-font: 'Noto Serif SC', 'Songti SC', 'STSong', 'SimSun', serif;
  /* 修改首页 tab 栏字体只需要改这里。 */
  --tab-font: 'Songti SC', 'STSong', 'Noto Serif SC', 'SimSun', serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-cinema: cubic-bezier(0.16, 1, 0.3, 1);
  --section-pad: clamp(40px, 6vh, 80px);
  --nav-gap: clamp(24px, 3vh, 32px);
  --tap-min: 44px;
  --mobile-gutter: clamp(18px, 5vw, 28px);
  --mobile-panel-gap: 14px;
  --sticky-surface: rgba(10, 10, 10, 0.97);
  --sticky-rule: rgba(237, 230, 211, 0.1);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html { background: var(--bg); }

body.archive-body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 300;
  letter-spacing: 0.005em;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  opacity: 0;
  transition: opacity 900ms var(--ease-cinema);
  min-height: 100vh;
}

body.archive-body.is-ready { opacity: 1; }

a { color: inherit; text-decoration: none; }

img { display: block; max-width: 100%; }

[x-cloak] { display: none !important; }

a,
button {
  -webkit-tap-highlight-color: rgba(237, 230, 211, 0.12);
  touch-action: manipulation;
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--ink-ivory-soft);
  outline-offset: 4px;
}

::selection { background: var(--ink-ivory); color: #0a0a0a; }

/* ---------- Layout ---------- */
.site-main {
  width: 100%;
  margin: 0 auto;
}

.container {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding-inline: clamp(20px, 5vw, 64px);
}

.container--narrow {
  max-width: 920px;
}

.container--wide {
  max-width: 1760px;
}

.container.gallery-shell {
  max-width: 1480px;
  padding-inline: clamp(20px, 5vw, 64px);
}

.container.journal-index,
.container.explore-index {
  max-width: 1480px;
  padding-inline: clamp(20px, 5vw, 64px);
}

@media (max-width: 720px) {
  .container.gallery-shell {
    padding-inline: clamp(20px, 5vw, 64px);
  }

  .container.journal-index,
  .container.explore-index {
    padding-inline: clamp(20px, 5vw, 64px);
  }
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 64px;
  padding: 0 clamp(20px, 5vw, 64px);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  background: var(--sticky-surface);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.site-nav {
  position: relative;
  width: 100%;
  max-width: 1760px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
  height: 100%;
}

.site-brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: var(--tap-min);
  line-height: 1;
  letter-spacing: 0.08em;
}

.site-brand-text {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--fg);
}

.site-brand-sub {
  font-family: var(--sans);
  font-size: 12px;
  margin-top: 3px;
  color: var(--fg-quiet);
  letter-spacing: 0.1em;
}

.nav-list {
  list-style: none;
  margin: 0 0 0 auto;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-item {
  position: relative;
}

.nav-link {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-family: var(--nav-font);
  font-size: 16px;
  letter-spacing: 0.12em;
  color: var(--fg-muted);
  transition: color 400ms var(--ease);
}

.nav-link:hover { color: var(--ink-ivory); }

.nav-item.is-active .nav-link { color: var(--ink-ivory); }

.nav-underline {
  display: block;
  height: 1px;
  width: 0;
  background: var(--ink-ivory);
  transition: width 700ms var(--ease-cinema);
}

.nav-link:hover .nav-underline,
.nav-underline--active { width: 100%; }

.home-nav-tabs {
  position: absolute;
  top: 50%;
  left: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 1.4vw, 22px);
  min-height: var(--tap-min);
  padding-inline: clamp(14px, 1.8vw, 24px);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(-50% - 10px));
  transition: opacity 260ms var(--ease), transform 360ms var(--ease-cinema);
  z-index: 2;
}

.home-nav-tab {
  position: relative;
  min-height: 38px;
  padding: 13px 1px 4px;
  border: 0;
  background: transparent;
  color: var(--fg-quiet);
  cursor: pointer;
  font-family: var(--tab-font);
  font-size: 13px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: 0.18em;
  transition: color 260ms var(--ease), opacity 260ms var(--ease);
}

.home-nav-tab:hover,
.home-nav-tab.is-active {
  color: var(--ink-ivory);
}

.home-nav-tab.is-active::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 18px;
  height: 1px;
  background: var(--accent);
  opacity: 0.84;
  transform: translateX(-50%);
}

@media (max-width: 880px), (min-width: 1060px) {
  .home-page .home-nav-tabs {
    display: flex;
  }

  body.home-tabs-merged .home-nav-tabs {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%);
  }
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: var(--tap-min);
  height: var(--tap-min);
  background: transparent;
  border: none;
  color: var(--fg);
  cursor: pointer;
  padding: 0;
}

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: '';
  display: block;
  height: 1px;
  width: 22px;
  background: currentColor;
  transition: transform 400ms var(--ease), opacity 200ms;
}

.nav-toggle-bar { position: relative; margin: 0 auto; }
.nav-toggle-bar::before { position: absolute; top: -7px; left: 0; }
.nav-toggle-bar::after  { position: absolute; top:  7px; left: 0; }

.nav-toggle-bar.is-open { background: transparent; }
.nav-toggle-bar.is-open::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle-bar.is-open::after  { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 880px) {
  .site-header {
    height: auto;
    min-height: 64px;
    padding-inline: var(--mobile-gutter);
  }
  .nav-toggle { display: block; }
  .nav-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 0 var(--mobile-gutter);
    border-bottom: 1px solid transparent;
    gap: 4px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 600ms var(--ease-cinema), padding 400ms, border-color 400ms;
  }
  .nav-list.is-open {
    max-height: 480px;
    padding-block: 24px 36px;
    border-bottom-color: var(--line);
  }
  .nav-link {
    flex-direction: row;
    gap: 12px;
    font-size: 16px;
    min-height: var(--tap-min);
    width: 100%;
    align-items: center;
  }
  .nav-item { width: 100%; }
  .nav-underline { width: 24px !important; height: 1px; }
}

/* ---------- Swiper Hero Coverflow ---------- */
.hero-slider {
  --slide-min-width: 360px;
  --slide-max-width: 80vw;
  --slide-width: clamp(var(--slide-min-width), 52vw, var(--slide-max-width));
  --slider-height: calc(var(--slide-width) * 9 / 16);
  --slide-radius: 8px;
  --swiper-padding-y: 2px;
  --side-blur: 3px;
  --slide-transition-duration: 2000ms;
  --side-brightness: 0.42;
  --side-hover-brightness: 0.75;
  --side-scale: 0.88;
  --intro-swing-duration: 1100ms;
  --intro-swing-angle: 2.5deg;

  position: relative;
  width: 100%;
  height: calc(var(--slider-height) + (var(--swiper-padding-y) * 2));
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  background: var(--bg);
}

.hero-slider .swiper {
  width: 100%;
  height: 100%;
  padding: var(--swiper-padding-y) 0;
}

.hero-slider .swiper-wrapper {
  align-items: center;
}

.hero-slider .swiper-slide {
  --tilt-angle: 30deg;
  width: var(--slide-width);
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--slide-radius);
  overflow: visible;
}

.hero-slider .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: var(--slide-radius);
  background: #000;
  pointer-events: none;
  filter: brightness(var(--side-brightness));
  transition: transform var(--slide-transition-duration) ease-out, filter 0.4s ease;
  transform-origin: center center;
}

.hero-slider .swiper-slide-active img {
  filter: brightness(1);
  transform: perspective(1000px) rotateY(0deg) scale(1);
}

.hero-slider .swiper-slide:not(.swiper-slide-active) img {
  transform: perspective(1000px) rotateY(var(--tilt-angle, 30deg)) scale(var(--side-scale));
}

.hero-slider .swiper-slide:not(.swiper-slide-active):hover {
  cursor: pointer;
}

.hero-slider .swiper-slide:not(.swiper-slide-active):hover img {
  filter: brightness(var(--side-hover-brightness));
}

/* blur-mode */
.blur-mode .swiper-slide img {
  filter: brightness(var(--side-brightness)) blur(var(--side-blur));
}

.blur-mode .swiper-slide-active img {
  filter: brightness(1) blur(0);
}

.blur-mode .swiper-slide:not(.swiper-slide-active):hover img {
  filter: brightness(var(--side-hover-brightness)) blur(0);
}

/* intro swing */
.intro-swing .swiper {
  animation: intro-swing var(--intro-swing-duration) ease-out both;
  transform-origin: center center;
}

@keyframes intro-swing {
  0% {
    transform: perspective(1400px) rotateY(calc(var(--intro-swing-angle) * -1));
  }
  55% {
    transform: perspective(1400px) rotateY(var(--intro-swing-angle));
  }
  100% {
    transform: perspective(1400px) rotateY(0deg);
  }
}

@media (max-width: 768px) {
  .hero-slider {
    --slide-min-width: 236px;
    --slide-max-width: 82vw;
    --slide-width: clamp(var(--slide-min-width), 82vw, var(--slide-max-width));
    --mobile-side-overlap: clamp(88px, 22vw, 150px);
    --side-blur: 0;
    --side-scale: 0.92;
  }

  .hero-slider .swiper-slide-active {
    z-index: 5 !important;
  }

  .hero-slider .swiper-slide-prev,
  .hero-slider .swiper-slide-next {
    z-index: 4 !important;
  }

  .hero-slider .swiper-slide-prev:not(.swiper-slide-active) img {
    transform: translateX(var(--mobile-side-overlap)) perspective(1000px) rotateY(var(--tilt-angle, 30deg)) scale(var(--side-scale));
  }

  .hero-slider .swiper-slide-next:not(.swiper-slide-active) img {
    transform: translateX(calc(var(--mobile-side-overlap) * -1)) perspective(1000px) rotateY(var(--tilt-angle, 30deg)) scale(var(--side-scale));
  }
}

@media (max-width: 900px) and (orientation: landscape) {
  .hero-slider {
    --slide-min-width: 220px;
    --slide-max-width: 42vw;
    --slide-width: clamp(var(--slide-min-width), 42vw, var(--slide-max-width));
  }
}

@media (min-width: 1920px) {
  .hero-slider {
    --slide-min-width: 400px;
    --slide-max-width: 40vw;
    --slide-width: clamp(var(--slide-min-width), 40vw, var(--slide-max-width));
  }
}

/* ---------- Editorial (摄影杂志式精选) ---------- */
.editorial {
  padding-block: clamp(80px, 10vw, 140px);
}

.editorial-intro {
  max-width: 720px;
  margin: 0 auto clamp(48px, 6vw, 80px);
  padding-inline: clamp(20px, 5vw, 64px);
  text-align: center;
}

.editorial-intro .kicker {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--fg-quiet);
  margin: 0 0 14px;
}

.editorial-intro .title {
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--fg);
  margin: 0;
  line-height: 1.5;
}

.editorial-row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: center;
  gap: clamp(16px, 2.4vw, 36px);
  margin-inline: auto;
  max-width: 1480px;
  padding-inline: clamp(20px, 5vw, 64px);
  padding-block: clamp(40px, 6vw, 80px);
}

.editorial-image {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: zoom-in;
}

.editorial-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  background: var(--bg);
  transition: opacity 800ms var(--ease);
}

.editorial-text {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.95;
  color: var(--fg-muted);
  letter-spacing: 0.06em;
  max-width: 28ch;
}

.editorial-text::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--fg-quiet);
  margin-bottom: 18px;
}

/* layout 变体 */
.editorial-row--wide-left .editorial-image { grid-column: 1 / span 7; }
.editorial-row--wide-left .editorial-text  { grid-column: 9 / span 4; }

.editorial-row--wide-right .editorial-image { grid-column: 6 / span 7; }
.editorial-row--wide-right .editorial-text  { grid-column: 1 / span 4; }

.editorial-row--dual-left  .editorial-image { grid-column: 1 / span 5; }
.editorial-row--dual-left  .editorial-text  { grid-column: 8 / span 4; }

.editorial-row--dual-right .editorial-image { grid-column: 8 / span 5; }
.editorial-row--dual-right .editorial-text  { grid-column: 1 / span 4; }

@media (max-width: 880px) {
  .editorial-row,
  .editorial-row--wide-left,
  .editorial-row--wide-right,
  .editorial-row--dual-left,
  .editorial-row--dual-right {
    grid-template-columns: 1fr;
    padding-block: clamp(36px, 8vw, 56px);
  }
  .editorial-row .editorial-image,
  .editorial-row .editorial-text {
    grid-column: 1;
  }
  .editorial-row .editorial-text {
    margin-top: 24px;
    max-width: 100%;
  }
}

/* ---------- Section headings ---------- */
.section {
  padding-block: clamp(64px, 9vw, 120px);
}

.section--first {
  padding-top: clamp(48px, 7vw, 80px);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: clamp(28px, 5vw, 56px);
  gap: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
}

.section-kicker {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--fg-quiet);
  margin: 0 0 12px;
}

.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 3.6vw, 38px);
  letter-spacing: 0.04em;
  margin: 0;
  line-height: 1.25;
}

.section-title em {
  font-style: normal;
  color: var(--fg-muted);
  font-weight: 300;
}

.section-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--fg-muted);
  white-space: nowrap;
  transition: color 400ms var(--ease);
  border-bottom: 1px solid var(--line);
  padding: 4px 0;
}

.section-link:hover { color: var(--ink-ivory); border-bottom-color: var(--ink-ivory-soft); }

/* ---------- Featured Photography grid (homepage) ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(180px, auto);
  gap: clamp(6px, 1vw, 14px);
}

.feature-cell {
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
}

.feature-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1800ms var(--ease-cinema), opacity 600ms;
}

.feature-cell:hover img { transform: scale(1.04); }

.feature-cell-info {
  position: absolute;
  left: 18px;
  bottom: 18px;
  font-family: var(--serif);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.feature-cell:hover .feature-cell-info { opacity: 1; transform: translateY(0); }

.feature-cell--landscape { grid-column: span 7; grid-row: span 2; }
.feature-cell--portrait  { grid-column: span 5; grid-row: span 3; }
.feature-cell--square    { grid-column: span 4; grid-row: span 2; }
.feature-cell--wide      { grid-column: span 8; grid-row: span 2; }
.feature-cell--small     { grid-column: span 4; grid-row: span 2; }

@media (max-width: 900px) {
  .feature-grid { grid-template-columns: repeat(6, 1fr); }
  .feature-cell--landscape,
  .feature-cell--portrait,
  .feature-cell--square,
  .feature-cell--wide,
  .feature-cell--small { grid-column: span 6; grid-row: span 1; }
  .feature-cell--portrait { grid-row: span 2; }
}

/* ---------- Portal section cards ---------- */
.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(16px, 2.5vw, 36px);
}

.portal-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--line-soft);
  background: var(--bg-card);
  min-height: 320px;
  transition: border-color 600ms var(--ease), transform 600ms var(--ease-cinema), background 600ms;
  overflow: hidden;
}

.portal-card:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.045);
  transform: translateY(-2px);
}

.portal-card-thumb {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  z-index: 0;
  transition: opacity 700ms var(--ease);
}

.portal-card:hover .portal-card-thumb { opacity: 0.32; }

.portal-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.2) brightness(0.7);
}

.portal-card-head, .portal-card-foot { position: relative; z-index: 1; }

.portal-card-kicker {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--fg-quiet);
  margin: 0 0 18px;
}

.portal-card-title {
  font-family: var(--serif);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 400;
  letter-spacing: 0.01em;
  margin: 0 0 14px;
  line-height: 1.1;
}

.portal-card-desc {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.7;
  color: var(--fg-muted);
  margin: 0;
  max-width: 36ch;
}

.portal-card-arrow {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--fg-muted);
  margin-top: 24px;
  transition: color 400ms var(--ease), letter-spacing 600ms;
}

.portal-card:hover .portal-card-arrow {
  color: var(--accent);
  letter-spacing: 0.16em;
}

/* ---------- Recent updates list ---------- */
.recent-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line-soft);
}

.recent-item {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 32px;
  align-items: baseline;
  padding-block: 22px;
  border-bottom: 1px solid var(--line-soft);
  transition: padding 400ms var(--ease);
}

.recent-item:hover { padding-inline: 8px; }

.recent-date {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--fg-quiet);
}

.recent-title {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  color: var(--fg);
}

.recent-tag {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--fg-muted);
}

@media (max-width: 720px) {
  .recent-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

/* ---------- Justified gallery (existing engine plugin) ---------- */
.gallery-host { width: 100%; }

#gallery-container .gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 800ms var(--ease), transform 1800ms var(--ease-cinema);
}

#gallery-container .gallery-item:hover img { transform: scale(1.03); }

/* ---------- Filter chips (Photography page) ---------- */
.filter-group {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  margin-block: 0;
  padding-bottom: 0;
  border-bottom: 1px solid transparent;
  transition: max-height 500ms var(--ease), opacity 400ms var(--ease), margin 500ms var(--ease), padding 500ms var(--ease), border-color 400ms var(--ease);
}

.filter-group.is-open {
  max-height: min(72dvh, 1200px);
  opacity: 1;
  margin-block: 16px 32px;
  padding-bottom: 16px;
  border-bottom-color: var(--line-soft);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.filter-summary {
  display: none;
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.1em;
  color: var(--fg-quiet);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.filter-row:last-child { margin-bottom: 0; }

.filter-chip {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.12em;
  min-height: var(--tap-min);
  padding: 10px 14px;
  border: 1px solid var(--line);
  color: var(--fg-muted);
  cursor: pointer;
  background: transparent;
  transition: color 400ms var(--ease), border-color 400ms var(--ease), background 400ms var(--ease), transform 220ms var(--ease);
  white-space: nowrap;
}

.filter-chip:hover { color: var(--ink-ivory); border-color: var(--ink-ivory-soft); }
.filter-chip.is-active { color: var(--ink-ivory); border-color: var(--ink-ivory); background: transparent; }
.filter-chip:active { transform: scale(0.98); }

.filter-actions {
  display: none;
}

.filter-action {
  min-height: var(--tap-min);
  padding: 10px 18px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg-muted);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.filter-action--primary {
  color: var(--ink-ivory);
  border-color: var(--ink-ivory-soft);
}

/* Gallery header actions */
.gallery-head {
  position: relative;
  flex-wrap: wrap;
  margin-bottom: clamp(28px, 5vw, 56px);
}
.gallery-head-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.gallery-sort-note {
  display: block;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  margin: 0;
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.1em;
  color: var(--fg-quiet);
  text-align: right;
  white-space: nowrap;
}

/* Search box */
.gallery-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gallery-search-toggle {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--fg-muted);
  cursor: pointer;
  transition: color 400ms var(--ease), border-color 400ms var(--ease);
  padding: 0;
  flex-shrink: 0;
}

.gallery-search-toggle:hover {
  color: var(--ink-ivory);
  border-color: var(--ink-ivory-soft);
}

.gallery-search-input {
  width: 0;
  opacity: 0;
  padding: 5px 0;
  border: none;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--fg);
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.04em;
  transition: width 400ms var(--ease), opacity 400ms var(--ease), padding 400ms var(--ease);
  outline: none;
}

.gallery-search-input.is-open {
  width: 200px;
  opacity: 1;
  padding: 5px 8px;
}

.gallery-search-input:focus {
  border-bottom-color: var(--ink-ivory-soft);
}

.gallery-search-input::placeholder {
  color: var(--fg-quiet);
}

/* Map link */
.gallery-map-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
  border: 1px solid var(--ink-ivory-faint);
  min-height: var(--tap-min);
  padding: 10px 14px;
  transition: color 400ms var(--ease), border-color 400ms var(--ease);
  white-space: nowrap;
}

.gallery-map-link:hover {
  color: var(--ink-ivory);
  border-color: var(--ink-ivory-soft);
}

/* Empty state */
.gallery-empty {
  display: none;
  text-align: center;
  padding: clamp(48px, 8vw, 96px) 20px;
  color: var(--fg-muted);
  font-family: var(--serif);
  font-size: 18px;
}

.gallery-empty.is-visible {
  display: block;
}

/* ---------- Map page (本地 SVG 中国地图) ---------- */
.map-page { padding: 0; position: relative; }

.map-frame {
  position: relative;
  width: 100%;
  background: var(--bg);
  padding: clamp(24px, 4vw, 56px) clamp(20px, 5vw, 64px);
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3vw, 36px);
  align-items: center;
}

.map-frame--immersive {
  padding: 0;
  min-height: calc(100vh - 80px);
  height: calc(100vh - 80px);
}

.map-back {
  position: absolute;
  top: 16px;
  left: clamp(20px, 5vw, 64px);
  z-index: 10;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 400ms var(--ease);
}

.map-back:hover { color: var(--ink-ivory); }

.map-head {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  text-align: left;
}

.map-kicker {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--fg-quiet);
  margin: 0 0 8px;
}

.map-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: 0.04em;
  color: var(--fg);
  margin: 0 0 10px;
}

.map-hint {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
  margin: 0;
}

.china-map {
  position: relative;
  width: 100%;
  max-width: 1480px;
  height: clamp(420px, 68vh, 720px);
  margin: 0 auto;
}

.china-map--immersive {
  max-width: none;
  width: 100%;
  height: 100%;
  margin: 0;
}

.china-map svg {
  width: 100%;
  height: 100%;
  display: block;
}

.china-map.is-zoomed svg,
.china-map--wall.is-pannable .map-wall-svg {
  touch-action: none;
}

.china-map--wall.is-pannable .map-wall-svg {
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.china-map--wall.is-dragging .map-wall-svg {
  cursor: grabbing;
}

.china-map--wall.is-dragging .map-wall-layer,
.china-map--wall.is-dragging .map-wall-zoom-layer {
  transition: none;
}

.china-map .province {
  fill: rgba(255, 255, 255, 0.025);
  stroke: rgba(255, 255, 255, 0.18);
  stroke-width: 0.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  shape-rendering: geometricPrecision;
  pointer-events: none;
  transition: fill 400ms var(--ease), stroke 400ms var(--ease), stroke-width 400ms var(--ease);
}

.china-map--wall.is-pannable .province {
  stroke: rgba(255, 255, 255, 0.24);
  stroke-width: 0.76;
}

.china-map .marker-dot {
  fill: #f5f4f0;
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 1;
  transition: fill 300ms var(--ease), stroke 300ms var(--ease), r 400ms var(--ease-cinema);
}

.china-map .marker-photo-ring {
  fill: rgba(245, 244, 240, 0.9);
  stroke: rgba(245, 244, 240, 0.82);
  stroke-width: 1.4;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.58));
  vector-effect: non-scaling-stroke;
  transition: stroke 300ms var(--ease), fill 300ms var(--ease);
  pointer-events: none;
}

.china-map .marker-card-arrow {
  fill: rgba(245, 244, 240, 0.9);
  stroke: rgba(245, 244, 240, 0.82);
  stroke-width: 1.1;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 3px 7px rgba(0, 0, 0, 0.42));
  pointer-events: none;
}

.china-map .marker-photo {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 320ms var(--ease-cinema), filter 300ms var(--ease);
  filter: brightness(0.92) saturate(1.04);
  pointer-events: none;
}

.china-map .marker--photo:hover .marker-photo,
.china-map .marker--photo:focus .marker-photo {
  filter: brightness(1.08) saturate(1.08);
}

.china-map .marker--photo:hover .marker-photo-ring,
.china-map .marker--photo:focus .marker-photo-ring {
  fill: rgba(255, 253, 245, 0.96);
  stroke: rgba(255, 253, 245, 0.98);
}

.china-map .marker--photo:hover .marker-card-arrow,
.china-map .marker--photo:focus .marker-card-arrow {
  fill: rgba(255, 253, 245, 0.96);
  stroke: rgba(255, 253, 245, 0.98);
}

.china-map .marker-leader {
  stroke: rgba(255, 255, 255, 0.18);
  stroke-width: 0.45;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.china-map .marker-hit {
  fill: rgba(255, 255, 255, 0.001);
  pointer-events: all;
}

/* Map controls */
.map-controls {
  position: absolute;
  top: auto;
  right: 24px;
  bottom: 24px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  height: var(--tap-min);
  z-index: 10;
}

.map-control-btn {
  width: var(--tap-min);
  height: var(--tap-min);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 10, 0.7);
  border: 1px solid var(--ink-ivory-faint);
  border-radius: 4px;
  color: var(--fg-muted);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: color 400ms var(--ease), border-color 400ms var(--ease);
  padding: 0;
}

.map-control-btn:hover {
  color: var(--ink-ivory);
  border-color: var(--ink-ivory-soft);
}

/* Map mode ribbon (三版本切换) */
.map-mode-ribbon {
  position: absolute;
  top: auto;
  right: 188px;
  bottom: 24px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  height: var(--tap-min);
  z-index: 10;
  background: rgba(10, 10, 10, 0.7);
  border: 1px solid var(--ink-ivory-faint);
  border-radius: 4px;
  padding: 0 6px;
}

.map-mode-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 400ms var(--ease);
  height: 100%;
  min-height: 0;
  padding: 0 12px;
  white-space: nowrap;
}

.map-mode-link:hover {
  color: var(--ink-ivory);
}

.map-mode-link.is-active {
  color: var(--ink-ivory);
}

.map-mode-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--fg-muted);
  display: inline-block;
  transition: background 400ms var(--ease), border-color 400ms var(--ease);
  flex-shrink: 0;
}

.map-mode-link:hover .map-mode-dot {
  border-color: var(--ink-ivory);
}

.map-mode-link.is-active .map-mode-dot {
  background: var(--ink-ivory);
  border-color: var(--ink-ivory);
}

.map-world-link {
  position: absolute;
  left: 24px;
  bottom: 24px;
  z-index: 10;
  min-height: var(--tap-min);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid var(--ink-ivory-faint);
  border-radius: 4px;
  background: rgba(10, 10, 10, 0.7);
  color: var(--fg-muted);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.12em;
  transition: color 400ms var(--ease), border-color 400ms var(--ease);
}

.map-world-link:hover {
  color: var(--ink-ivory);
  border-color: var(--ink-ivory-soft);
}

.world-map-page {
  position: relative;
  min-height: calc(100dvh - 72px);
  display: grid;
  place-items: center;
  background: #050505;
}

.world-map-message {
  max-width: min(84vw, 760px);
  padding: 0 24px;
  color: var(--ink-ivory);
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 42px);
  font-weight: 300;
  line-height: 1.7;
  letter-spacing: 0.08em;
  text-align: center;
}

/* Map zoom layer transition */
.map-wrapper,
.map-wall-layer,
.map-wall-zoom-layer {
  transition: transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center center;
  transform-box: view-box;
}

/* City preview card */
.city-preview {
  position: absolute;
  pointer-events: auto;
  background: rgba(10, 10, 10, 0.95);
  border: 1px solid var(--ink-ivory-faint);
  border-radius: 6px;
  padding: 12px 14px;
  opacity: 0;
  transform: translate(-50%, -100%) translateY(4px);
  transition: opacity 250ms var(--ease), transform 250ms var(--ease);
  z-index: 20;
  min-width: 180px;
  max-width: 260px;
  cursor: pointer;
}

.city-preview.is-visible {
  opacity: 1;
  transform: translate(-50%, -100%) translateY(0);
}

.city-preview-arrow {
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background: rgba(10, 10, 10, 0.95);
  border-right: 1px solid var(--ink-ivory-faint);
  border-bottom: 1px solid var(--ink-ivory-faint);
}

.city-preview-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.city-preview-name {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--fg);
  letter-spacing: 0.04em;
}

.city-preview-cats {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--fg-quiet);
}

.city-preview-thumbs {
  display: flex;
  gap: 6px;
}

.city-preview-thumbs img {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: 3px;
  display: block;
}

.city-preview-actions {
  display: none;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--ink-ivory);
}

.city-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(10, 10, 10, 0.92);
  border: 1px solid var(--line);
  color: var(--fg);
  padding: 8px 14px;
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 250ms var(--ease), transform 250ms var(--ease);
  white-space: nowrap;
  z-index: 5;
}

.city-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 760px) {
  .map-frame--immersive {
    min-height: calc(100dvh - 64px);
    height: calc(100dvh - 64px);
  }

  .map-back {
    top: 10px;
    left: var(--mobile-gutter);
    min-height: var(--tap-min);
    display: inline-flex;
    align-items: center;
    padding-inline: 12px;
    background: rgba(10, 10, 10, 0.72);
    border: 1px solid var(--ink-ivory-faint);
    border-radius: 5px;
  }

  .china-map { height: 58dvh; min-height: 360px; }
  .china-map--immersive { height: calc(100vh - 64px); min-height: 320px; }

  .map-controls {
    top: auto;
    right: var(--mobile-gutter);
    bottom: calc(76px + env(safe-area-inset-bottom));
    flex-direction: row;
    gap: 8px;
  }

  .map-mode-ribbon {
    top: auto;
    left: var(--mobile-gutter);
    right: var(--mobile-gutter);
    bottom: calc(16px + env(safe-area-inset-bottom));
    flex-direction: row;
    align-items: stretch;
    justify-content: center;
    gap: 6px;
    height: auto;
    padding: 6px;
    border-radius: 6px;
  }

  .map-mode-link {
    flex: 1 1 0;
    justify-content: center;
    height: auto;
    min-height: var(--tap-min);
    padding: 10px 12px;
    min-width: 0;
  }

  .map-world-link {
    left: var(--mobile-gutter);
    bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .city-preview {
    position: fixed;
    left: var(--mobile-gutter) !important;
    right: var(--mobile-gutter);
    bottom: calc(132px + env(safe-area-inset-bottom));
    top: auto !important;
    min-width: 0;
    max-width: none;
    padding: 14px 16px;
    transform: translateY(8px);
  }

  .city-preview.is-visible {
    transform: translateY(0);
  }

  .city-preview-arrow { display: none; }
  .city-preview-thumbs { display: flex; }
  .city-preview-thumbs img { flex: 1 1 0; min-width: 0; height: 54px; }
  .city-preview-actions { display: block; }

  .china-map .marker-photo-ring {
    stroke-width: 1.4;
  }
}

@media (max-width: 900px) and (orientation: landscape) {
  .map-frame--immersive {
    min-height: calc(100dvh - 64px);
    height: calc(100dvh - 64px);
  }

  .map-back {
    top: 10px;
    left: var(--mobile-gutter);
    min-height: var(--tap-min);
    display: inline-flex;
    align-items: center;
    padding-inline: 12px;
    background: rgba(10, 10, 10, 0.72);
    border: 1px solid var(--ink-ivory-faint);
    border-radius: 5px;
  }

  .map-controls {
    top: auto;
    right: var(--mobile-gutter);
    bottom: calc(76px + env(safe-area-inset-bottom));
    flex-direction: row;
    gap: 8px;
  }

  .map-mode-ribbon {
    top: auto;
    left: var(--mobile-gutter);
    right: var(--mobile-gutter);
    bottom: calc(16px + env(safe-area-inset-bottom));
    flex-direction: row;
    align-items: stretch;
    justify-content: center;
    gap: 6px;
    height: auto;
    padding: 6px;
    border-radius: 6px;
  }

  .map-mode-link {
    flex: 1 1 0;
    justify-content: center;
    height: auto;
    min-height: var(--tap-min);
    padding: 10px 12px;
    min-width: 0;
  }

  .map-world-link {
    left: var(--mobile-gutter);
    bottom: calc(76px + env(safe-area-inset-bottom));
  }
}

body.map-fullscreen {
  height: 100dvh;
  overflow: hidden;
}

body.map-fullscreen .site-main {
  height: calc(100dvh - 64px);
  overflow: hidden;
}

body.map-fullscreen .map-page,
body.map-fullscreen .map-frame--immersive,
body.map-fullscreen .china-map--immersive {
  min-height: 0;
  height: 100%;
}

body.map-fullscreen .map-page {
  overflow: hidden;
}

/* ---------- Journal ---------- */

/* 列表页 */
.journal-index {
  max-width: none;
}

.journal-index-head {
  margin-bottom: clamp(42px, 6vw, 72px);
}

.journal-index-head .section-kicker {
  color: var(--fg-quiet);
}

.journal-index .section-title {
  font-size: clamp(26px, 3.6vw, 38px);
  line-height: 1.25;
  letter-spacing: 0.04em;
  font-weight: 400;
}

.journal-index-count {
  margin: 0;
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.8;
  letter-spacing: 0.14em;
  color: var(--article-ink-quiet);
}

.journal-list {
  max-width: none;
  margin: 0 auto;
  border-top: 0;
  position: relative;
}

.journal-item {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: clamp(18px, 4vw, 42px);
  align-items: start;
  padding: clamp(30px, 4vw, 44px) clamp(14px, 2vw, 22px);
  border-bottom: 1px solid var(--article-rule-soft);
  background: transparent;
  transition:
    background 300ms var(--ease),
    border-color 300ms var(--ease),
    transform 300ms var(--ease-cinema);
  opacity: 0;
  transform: translateY(16px);
  text-decoration: none;
  color: inherit;
}

body.is-ready .journal-item {
  animation: fadeUp 700ms var(--ease-cinema) calc(var(--i, 0) * 100ms + 200ms) both;
}

.journal-item:hover,
.journal-item:focus-visible {
  animation: none;
  opacity: 1;
  background: rgba(238, 231, 216, 0.035);
  border-bottom-color: var(--article-rule);
  transform: translateY(-6px);
  outline: none;
}

.journal-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  width: 96px;
  height: 1px;
  background: var(--article-accent-soft);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 400ms var(--ease-cinema);
}

.journal-item:hover::before,
.journal-item:focus-visible::before {
  transform: scaleX(1);
}

.journal-item--text-only {
  grid-template-columns: 56px minmax(0, 1fr);
}

.journal-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-soft);
}

/* 序号标签 */
.journal-thumb::after {
  content: attr(data-index);
  position: absolute;
  top: 8px;
  left: 8px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--fg);
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(4px);
  padding: 3px 8px;
  z-index: 2;
  opacity: 0;
  transition: opacity 400ms var(--ease);
}

.journal-item:hover .journal-thumb::after {
  opacity: 1;
}

.journal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: opacity 600ms var(--ease), transform 1200ms var(--ease-cinema);
}

.journal-item:hover .journal-thumb img {
  opacity: 1;
  transform: scale(1.04);
}

.journal-item-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.journal-item-meta {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--article-ink-quiet);
  display: flex;
  align-items: center;
  gap: 10px;
}

.journal-item-number {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.8;
  color: var(--article-accent-text);
  transition: color 300ms var(--ease), opacity 300ms var(--ease);
  font-variant-numeric: tabular-nums;
}

.journal-item-title {
  font-family: var(--serif);
  font-size: clamp(26px, 3.2vw, 40px);
  font-weight: 300;
  line-height: 1.28;
  letter-spacing: 0.01em;
  color: var(--article-ink);
  margin: 0;
}

.journal-item-title {
  transition: color 400ms var(--ease);
}

.journal-item:hover .journal-item-title,
.journal-item:focus-visible .journal-item-title {
  color: var(--article-ink);
}

.journal-item:hover .journal-item-number,
.journal-item:focus-visible .journal-item-number {
  color: var(--article-ink);
}

.journal-item-excerpt {
  font-family: var(--serif);
  font-size: clamp(16px, 1.15vw, 18px);
  line-height: 1.95;
  color: var(--article-ink-muted);
  margin: 0;
  max-width: 36em;
}

/* 文章页 */
.journal-article-layout {
  display: block;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 clamp(22px, 6vw, 64px);
}

.article-sidebar {
  position: static;
  min-height: 0;
  padding-top: clamp(34px, 5vw, 62px);
  border-right: 0;
  max-width: 820px;
  margin: 0 auto;
  text-align: left;
}

.journal-article-wrapper {
  min-width: 0;
}

.journal-article {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(34px, 5vw, 70px) 0 clamp(70px, 9vw, 118px);
}

.article-bottom-back {
  padding-bottom: clamp(48px, 6vw, 80px);
  padding-top: 30px;
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.journal-progress {
  position: sticky;
  top: 64px;
  left: 0;
  right: 0;
  z-index: 49;
  height: 1px;
  background: var(--article-rule-soft);
}

.journal-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--article-accent-soft);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 90ms linear;
}

.article-back {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.12em;
  color: var(--article-ink-quiet);
  text-decoration: none;
  margin-bottom: 0;
  transition: color 400ms var(--ease);
}

.article-back:hover {
  color: var(--article-ink);
}

.article-sidebar-folio {
  display: none;
  align-items: center;
  gap: 18px;
  writing-mode: vertical-rl;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  line-height: 1;
  color: var(--article-ink-quiet);
}

.article-sidebar-folio span:first-child {
  color: var(--article-accent-text);
}

.article-masthead {
  margin-bottom: clamp(48px, 7vw, 86px);
  padding-bottom: 0;
  border-bottom: 0;
  position: relative;
  text-align: center;
}

.article-masthead::before {
  content: none;
}

body.is-ready .article-masthead {
  animation: fadeUp 600ms var(--ease-cinema) both;
}

body.is-ready .article-body {
  animation: fadeUp 600ms var(--ease-cinema) 120ms both;
}

body.is-ready .article-nav {
  animation: fadeUp 600ms var(--ease-cinema) 200ms both;
}

.article-masthead h1 {
  font-family: var(--serif);
  font-size: clamp(44px, 6.4vw, 72px);
  font-weight: 300;
  line-height: 1.16;
  margin: 0;
  letter-spacing: 0.01em;
  color: var(--article-ink);
  word-break: keep-all;
}

.article-deck {
  max-width: 620px;
  margin: clamp(26px, 4vw, 36px) auto 0;
  font-family: var(--serif);
  font-size: clamp(19px, 1.75vw, 22px);
  line-height: 1.95;
  color: var(--article-ink-muted);
  text-align: center;
}

.journal-article .article-hero {
  margin: clamp(24px, 3vw, 40px) 0;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 480px;
  overflow: hidden;
  background: var(--bg-soft);
}

.journal-article .article-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-meta-line {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.8;
  letter-spacing: 0.14em;
  color: var(--article-ink-quiet);
  margin-top: clamp(30px, 4vw, 42px);
}

.article-meta-sep {
  color: var(--article-accent-soft);
  opacity: 0.4;
}

.article-body {
  max-width: 680px;
  margin: 0 auto;
  counter-reset: article-section;
}

.article-body > p:first-of-type:not(.article-deck)::first-letter {
  float: none;
  margin: 0;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  font-weight: inherit;
}

.article-body > p:first-of-type {
  font-size: clamp(18px, 1.22vw, 19px);
  line-height: 2.15;
  text-indent: 0;
}

/* 段落：首行缩进 + 两端对齐 */
.journal-article p {
  font-family: var(--serif);
  font-size: clamp(17px, 1.15vw, 18px);
  line-height: 2.15;
  color: var(--article-ink);
  margin: 0 0 1.55em;
  text-align: justify;
  text-justify: inter-ideograph;
  text-indent: 2em;
}

.journal-article .article-deck {
  max-width: 620px;
  margin: clamp(26px, 4vw, 36px) auto 0;
  font-size: clamp(19px, 1.75vw, 22px);
  line-height: 1.95;
  color: var(--article-ink-muted);
  text-indent: 0;
  text-align: center;
}

/* 引用块内的段落不缩进 */
.journal-article blockquote p {
  text-indent: 0;
}

/* 列表项内的段落不缩进 */
.journal-article li p {
  text-indent: 0;
}

.article-body h2 {
  counter-increment: article-section;
  font-family: var(--serif);
  font-size: clamp(30px, 3.2vw, 42px);
  font-weight: 300;
  margin-top: clamp(82px, 11vw, 132px);
  margin-bottom: clamp(28px, 4vw, 38px);
  color: var(--article-ink);
  letter-spacing: 0.02em;
  line-height: 1.28;
  padding-top: 0;
  position: relative;
  text-align: center;
}

.article-body h2::before {
  content: counter(article-section, cjk-ideographic);
  display: block;
  margin-bottom: 16px;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--article-accent-text);
}

.article-body h2::after {
  content: none;
}

.article-body h3 {
  font-family: var(--serif);
  font-size: clamp(22px, 1.9vw, 26px);
  font-weight: 400;
  margin-top: 2.8em;
  margin-bottom: 0.85em;
  color: var(--article-ink);
  letter-spacing: 0.02em;
  line-height: 1.35;
  text-align: center;
}

.journal-article blockquote {
  position: relative;
  margin: 2.8em 0;
  padding: 24px 28px 24px 30px;
  border-left: 2px solid var(--article-accent-soft);
  border-block: 0;
  color: var(--article-ink-muted);
  font-style: normal;
  background: rgba(238, 231, 216, 0.035);
}

.article-body > blockquote:first-child {
  margin-top: 0;
  margin-bottom: 3em;
  padding: clamp(28px, 4vw, 40px) 0;
  border-left: 0;
  border-block: 1px solid var(--article-rule);
  background: none;
}

.journal-article blockquote p {
  color: var(--article-ink-muted);
  font-size: clamp(16px, 1.05vw, 17px);
  line-height: 2.05;
  margin-bottom: 0;
  text-indent: 0;
}

.article-body > blockquote:first-child p {
  font-size: clamp(16px, 1.05vw, 17px);
  line-height: 2.08;
  color: var(--article-ink);
  text-align: center;
}

.journal-article ul,
.journal-article ol {
  font-family: var(--serif);
  font-size: clamp(17px, 1.15vw, 18px);
  line-height: 2.1;
  padding-left: 1.5em;
  margin-bottom: 1.5em;
  color: var(--article-ink);
}

.journal-article li {
  margin-bottom: 0.3em;
}

.journal-article code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88em;
  color: var(--article-ink);
  background: var(--article-rule-soft);
  padding: 0.1em 0.35em;
}

.journal-article figure {
  margin: clamp(32px, 5vw, 56px) auto;
  overflow: hidden;
  position: relative;
}

/* 画框角装饰 */
.journal-article figure::before,
.journal-article figure::after {
  content: "";
  position: absolute;
  z-index: 2;
  width: 28px;
  height: 28px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 500ms var(--ease);
}

.journal-article figure::before {
  top: 10px;
  left: 10px;
  border-top: 1px solid rgba(237, 230, 211, 0.35);
  border-left: 1px solid rgba(237, 230, 211, 0.35);
}

.journal-article figure::after {
  right: 10px;
  bottom: 10px;
  border-right: 1px solid rgba(237, 230, 211, 0.25);
  border-bottom: 1px solid rgba(237, 230, 211, 0.25);
}

.journal-article figure:hover::before,
.journal-article figure:hover::after {
  opacity: 1;
}

.journal-article figure img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 1200ms var(--ease-cinema);
}

.journal-article figure:hover img {
  transform: scale(1.02);
}

.journal-article figcaption {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--article-ink-quiet);
  letter-spacing: 0.12em;
  margin-top: 12px;
  text-align: center;
}

.journal-article hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--article-rule), transparent);
  margin: clamp(64px, 9vw, 96px) auto clamp(30px, 5vw, 46px);
  max-width: 96px;
  position: relative;
}

.journal-article hr::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--article-accent-soft);
}

.article-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: clamp(48px, 6vw, 72px);
  padding-block: 28px;
  border-top: 1px solid var(--article-rule-soft);
  position: relative;
}

.article-nav::after {
  content: none;
}

.article-nav-link {
  display: inline-flex;
  min-height: var(--tap-min);
  align-items: center;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--article-ink-muted);
  text-decoration: none;
  transition: color 400ms var(--ease);
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.article-nav-link--next {
  margin-left: auto;
  text-align: right;
}

.article-nav-link.is-disabled {
  color: var(--article-ink-quiet);
  opacity: 0.34;
  cursor: default;
  pointer-events: none;
}

.article-nav-link:hover {
  color: var(--article-ink);
}

.article-nav-sep {
  color: var(--article-ink-quiet);
  opacity: 0.3;
}

@media (max-width: 760px) {
  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
  }

  .section-title {
    font-size: clamp(25px, 8vw, 34px);
  }

  .section-link {
    white-space: normal;
  }

  .journal-article-layout {
    display: block;
    padding: 0 clamp(18px, 5vw, 28px);
  }
  .article-sidebar {
    position: static;
    min-height: 0;
    padding-top: clamp(26px, 5vw, 42px);
    border-right: 0;
  }
  .article-sidebar-folio { display: none; }
  .journal-article {
    padding: clamp(18px, 4vw, 34px) 0 clamp(42px, 7vw, 64px);
  }
  .journal-item {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 22px 0;
  }
  .journal-item-number {
    font-size: 13px;
    line-height: 1;
  }
  .journal-item-title {
    font-size: clamp(22px, 6.8vw, 30px);
  }
  .journal-item-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 15px;
    line-height: 1.75;
  }
  .journal-thumb {
    aspect-ratio: 16 / 9;
  }
  .article-masthead h1 {
    font-size: clamp(32px, 9.5vw, 44px);
  }

  .article-masthead {
    margin-bottom: 34px;
  }

  .article-body > p:first-of-type,
  .journal-article p,
  .journal-article ul,
  .journal-article ol {
    font-size: 16px;
    line-height: 1.95;
  }
  .article-body > p:first-of-type::first-letter {
    font-size: inherit;
  }
  .journal-article blockquote {
    padding: 20px 18px 20px 20px;
    margin: 2em 0;
  }
  .article-body > blockquote:first-child {
    padding: 24px 0;
    border-left: 0;
  }
  .article-nav {
    display: block;
  }
  .article-nav-link {
    display: block;
    max-width: 100%;
    white-space: normal;
  }
  .article-nav-sep {
    display: none;
  }
  .article-nav-link + .article-nav-link,
  .article-nav-sep + .article-nav-link {
    margin-top: 16px;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Explore (原 Lab) ---------- */
.lab-grid,
.explore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(18px, 2vw, 28px);
}

.lab-card,
.explore-card {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  padding: clamp(24px, 3vw, 32px);
  border: 1px solid var(--ink-ivory-faint);
  background: #0E0E0E;
  border-radius: 6px;
  transition: border-color 400ms var(--ease), transform 500ms var(--ease-cinema), box-shadow 500ms var(--ease);
  min-height: 220px;
  opacity: 0;
  transform: translateY(16px);
}

.explore-card--external {
  border-style: dashed;
}

body.is-ready .explore-card {
  animation: fadeUp 700ms var(--ease-cinema) calc(var(--i, 0) * 80ms + 200ms) both;
}

.lab-card:hover,
.explore-card:hover,
.explore-card:focus-visible {
  border-color: rgba(237, 230, 211, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  outline: none;
}

.lab-card-year,
.explore-card-year {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--fg-quiet);
  transition: color 400ms var(--ease);
}

.lab-card:hover .lab-card-year,
.explore-card:hover .explore-card-year,
.explore-card:focus-visible .explore-card-year {
  color: var(--fg-muted);
}

.lab-card-title,
.explore-card-title {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  margin: 14px 0 12px;
  line-height: 1.15;
  transition: color 400ms var(--ease);
}

.lab-card:hover .lab-card-title,
.explore-card:hover .explore-card-title,
.explore-card:focus-visible .explore-card-title {
  color: var(--ink-ivory);
}

.lab-card-desc,
.explore-card-desc {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.7;
  flex-grow: 1;
}

.lab-card-tags,
.explore-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.lab-card-tag,
.explore-card-tag {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--fg-quiet);
  border: 1px solid var(--ink-ivory-faint);
  padding: 3px 9px;
  border-radius: 3px;
  transition: border-color 400ms var(--ease), color 400ms var(--ease), background 400ms var(--ease);
}

.explore-card-tag--more {
  min-width: 32px;
  text-align: center;
}

.lab-card:hover .lab-card-tag,
.explore-card:hover .explore-card-tag,
.explore-card:focus-visible .explore-card-tag {
  border-color: rgba(237, 230, 211, 0.2);
  color: var(--fg-muted);
  background: rgba(237, 230, 211, 0.03);
}

.lab-card-link {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-top: 20px;
  transition: color 400ms var(--ease), letter-spacing 400ms var(--ease-cinema);
}

.lab-card:hover .lab-card-link {
  letter-spacing: 0.16em;
}

@media (max-width: 760px) {
  .explore-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .explore-card:first-child {
    grid-column: 1 / -1;
  }

  .explore-card {
    min-height: 164px;
    padding: 16px 14px;
    border-radius: 6px;
  }

  .explore-card-year {
    font-size: 10px;
    line-height: 1.4;
    letter-spacing: 0.12em;
  }

  .explore-card-title {
    font-size: clamp(17px, 4.8vw, 19px);
    line-height: 1.18;
    margin: 10px 0 8px;
  }

  .explore-card-desc {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.55;
  }

  .explore-card-tags {
    gap: 6px;
    margin-top: 12px;
  }

  .explore-card-tag {
    font-size: 9px;
    padding: 3px 6px;
  }
}

@media (max-width: 360px) {
  .explore-grid {
    grid-template-columns: 1fr;
  }

  .explore-card {
    min-height: 148px;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line-soft);
  margin-top: clamp(40px, 6vh, 64px);
  padding: 56px clamp(20px, 5vw, 64px);
}

.site-footer-inner {
  max-width: 1760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.site-footer-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--fg-muted);
}

.site-footer-sep { color: var(--fg-quiet); }
.site-footer-quiet { color: var(--fg-quiet); text-transform: none; letter-spacing: 0.02em; font-family: var(--serif); font-size: 13px; }

.site-footer-copy {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--fg-quiet);
  margin: 0;
  letter-spacing: 0.1em;
}

/* ---------- Helper reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 1000ms var(--ease-cinema), transform 1000ms var(--ease-cinema);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Fancybox visual tweaks ---------- */
.fancybox__container { --fancybox-bg: var(--bg); }

.fancybox__caption {
  font-family: var(--serif) !important;
  font-size: 16px !important;
  letter-spacing: 0.04em !important;
  color: var(--fg-muted) !important;
}

@media (hover: hover) and (pointer: fine) {
  .fancybox__container .fancybox__nav .f-button.is-prev,
  .fancybox__container .fancybox__nav .f-button.is-next {
    top: 0 !important;
    width: min(18vw, 168px) !important;
    height: 100% !important;
    margin: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: rgba(245, 244, 240, 0.9) !important;
    opacity: 0 !important;
    transform: none !important;
    transition: opacity 180ms var(--ease), background 180ms var(--ease) !important;
  }

  .fancybox__container .fancybox__nav .f-button.is-prev {
    left: 0 !important;
    justify-content: flex-start !important;
    padding-left: clamp(18px, 3vw, 42px) !important;
  }

  .fancybox__container .fancybox__nav .f-button.is-next {
    right: 0 !important;
    justify-content: flex-end !important;
    padding-right: clamp(18px, 3vw, 42px) !important;
  }

  .fancybox__container .fancybox__nav .f-button.is-prev:hover,
  .fancybox__container .fancybox__nav .f-button.is-next:hover,
  .fancybox__container .fancybox__nav .f-button.is-prev:focus-visible,
  .fancybox__container .fancybox__nav .f-button.is-next:focus-visible {
    opacity: 1 !important;
    background: linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.24),
      rgba(0, 0, 0, 0)
    ) !important;
  }

  .fancybox__container .fancybox__nav .f-button.is-next:hover,
  .fancybox__container .fancybox__nav .f-button.is-next:focus-visible {
    background: linear-gradient(
      270deg,
      rgba(0, 0, 0, 0.24),
      rgba(0, 0, 0, 0)
    ) !important;
  }
}

@media (hover: none), (pointer: coarse) {
  .fancybox__container .fancybox__nav .f-button.is-prev,
  .fancybox__container .fancybox__nav .f-button.is-next {
    display: none !important;
  }
}

/* ---------- Journal article nav ---------- */
.article-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: clamp(48px, 6vw, 80px);
  padding-block: clamp(20px, 3vw, 32px);
  border-block: 1px solid var(--article-rule-soft);
}

.article-nav-link {
  display: inline-flex;
  min-height: var(--tap-min);
  align-items: center;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--article-ink-muted);
  text-decoration: none;
  transition: color 400ms var(--ease);
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.article-nav-link--next {
  margin-left: auto;
  text-align: right;
}

.article-nav-link.is-disabled {
  color: var(--article-ink-quiet);
  opacity: 0.34;
  cursor: default;
  pointer-events: none;
}

.article-nav-link:hover { color: var(--article-ink); }

.article-nav-sep { color: var(--article-ink-quiet); }

@media (max-width: 760px) {
  .article-nav {
    display: block;
  }
  .article-nav-link {
    display: block;
    max-width: 100%;
    white-space: normal;
  }
  .article-nav-sep {
    display: none;
  }
  .article-nav-sep + .article-nav-link {
    margin-top: 16px;
  }
}

/* Year anchors */
.year-anchors {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: clamp(24px, 3vw, 40px);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
}

.year-anchor-link {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--fg-quiet);
  text-decoration: none;
  transition: color 400ms var(--ease);
}

.year-anchor-link:hover { color: var(--ink-ivory); }

.year-anchor {
  scroll-margin-top: 100px;
}

/* ---------- Entrance animation ---------- */
.reveal-up {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s var(--ease-cinema), transform 0.5s var(--ease-cinema);
}

.reveal-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Home tabs ---------- */
.home-tabs {
  max-width: 1760px;
  margin: 0 auto;
  padding-inline: clamp(20px, 5vw, 64px);
}

.home-tabs.is-switching-tab .tab-panel {
  opacity: 0;
  pointer-events: none;
}

.home-tab-intro {
  min-height: clamp(64px, 8vw, 104px);
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--serif);
  font-size: clamp(15px, 1.35vw, 18px);
  font-weight: 300;
  line-height: 1.75;
  letter-spacing: 0.08em;
  color: rgba(245, 244, 240, 0.78);
  text-wrap: balance;
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
  animation: home-tab-intro-float 5.6s ease-in-out infinite;
  text-shadow: 0 0 18px rgba(237, 230, 211, 0.08);
}

@keyframes home-tab-intro-float {
  0%, 100% {
    color: rgba(245, 244, 240, 0.72);
    filter: blur(0.45px);
    transform: none;
    text-shadow: 0 0 12px rgba(237, 230, 211, 0.05);
  }
  28% {
    color: rgba(255, 253, 245, 0.9);
    filter: blur(0);
    transform: none;
    text-shadow: 0 0 24px rgba(237, 230, 211, 0.15);
  }
  58% {
    color: rgba(255, 253, 245, 0.9);
    filter: blur(0.1px);
    transform: none;
    text-shadow: 0 0 20px rgba(237, 230, 211, 0.12);
  }
  78% {
    color: rgba(245, 244, 240, 0.76);
    filter: blur(0.35px);
    transform: none;
    text-shadow: 0 0 14px rgba(237, 230, 211, 0.07);
  }
}

.home-tab-intro + .magazine .magazine-row:first-child,
.home-tab-intro + .magazine .magazine-row:first-child:not([data-tight-stack="true"]) {
  padding-top: 0;
}

.home-tab-content-section {
  padding-block: 0 var(--section-pad);
}

@media (max-width: 720px) {
  .home-tab-intro {
    min-height: clamp(58px, 15vw, 76px);
    padding-inline: 4px;
    font-size: clamp(13px, 3.65vw, 15px);
    line-height: 1.65;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-tab-intro {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* ---------- Recent writings list ---------- */
.recent-divider {
  max-width: 1480px;
  margin: 0 auto;
  padding-inline: clamp(20px, 5vw, 64px);
  border-top: 1px solid var(--line-soft);
  margin-top: var(--section-pad);
}

.recent-writings {
  padding-block: var(--section-pad);
}

.recent-writing-list {
  max-width: 1480px;
  margin: 0 auto;
  padding-inline: clamp(20px, 5vw, 64px);
}

.recent-writing-item {
  border-bottom: 1px solid var(--line-soft);
  padding-block: 18px;
  transition: padding 400ms var(--ease);
}

.recent-writing-item:hover {
  padding-inline: 8px;
}

.recent-writing-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: inherit;
  text-decoration: none;
}

.recent-writing-title {
  font-family: var(--serif);
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 400;
  color: var(--fg);
  letter-spacing: 0.02em;
}

.recent-writing-meta {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
}

@media (max-width: 720px) {
  .recent-writing-link {
    gap: 4px;
  }
  .recent-writing-title {
    font-size: 16px;
  }
}

.tab-bar {
  display: flex;
  gap: clamp(20px, 3vw, 36px);
  justify-content: center;
  padding-top: 8px;
  padding-bottom: 10px;
  margin-bottom: clamp(12px, 2vw, 20px);
  position: sticky;
  top: 64px;
  z-index: 40;
  background: var(--sticky-surface);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--sticky-rule);
  /* 横向 bleed，确保遮罩覆盖下方内容 */
  width: calc(100% + 2 * clamp(20px, 5vw, 64px));
  margin-left: calc(-1 * clamp(20px, 5vw, 64px));
  margin-right: calc(-1 * clamp(20px, 5vw, 64px));
  padding-left: clamp(20px, 5vw, 64px);
  padding-right: clamp(20px, 5vw, 64px);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 260ms var(--ease), transform 360ms var(--ease-cinema), border-color 260ms var(--ease);
  will-change: opacity, transform;
}

@media (max-width: 880px), (min-width: 1060px) {
  body.home-tabs-merged .tab-bar {
    opacity: 0;
    pointer-events: none;
    transform: translateY(calc(-100% - 4px));
    border-bottom-color: transparent;
  }
}

.tab-btn {
  font-family: var(--tab-font);
  font-size: 15px;
  letter-spacing: 0.14em;
  color: var(--fg-quiet);
  background: transparent;
  border: none;
  min-height: var(--tap-min);
  padding: 10px 6px 12px;
  cursor: pointer;
  position: relative;
  transition: color 400ms var(--ease);
}

.tab-btn:hover { color: var(--ink-ivory); }

.tab-btn.is-active {
  color: var(--ink-ivory);
}

.tab-btn.is-active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--ink-ivory);
}

@media (max-width: 720px) {
  .home-tabs {
    padding-inline: var(--mobile-gutter);
  }

  .tab-bar {
    justify-content: flex-start;
    gap: 6px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    top: 64px;
    width: calc(100% + 2 * var(--mobile-gutter));
    margin-left: calc(-1 * var(--mobile-gutter));
    margin-right: calc(-1 * var(--mobile-gutter));
    padding-left: var(--mobile-gutter);
    padding-right: var(--mobile-gutter);
    padding-top: 6px;
    padding-bottom: 6px;
    scrollbar-width: none;
  }

  .tab-bar::-webkit-scrollbar { display: none; }

  .tab-btn {
    flex: 1 0 calc((100vw - 2 * var(--mobile-gutter) - 18px) / 4);
    min-width: 64px;
    scroll-snap-align: start;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-nav-tabs,
  .topic-return-button,
  .tab-bar {
    transition: none;
  }

  .home-load-reveal .magazine-image,
  .home-load-reveal .magazine-text-wrap,
  .home-load-reveal.archive-topic-photo {
    opacity: 1;
    transform: none !important;
    transition: none;
  }
}

/* Tab panel Alpine transitions */
.tab-enter { transition: opacity 500ms var(--ease-cinema), transform 500ms var(--ease-cinema); }
.tab-hidden { opacity: 0; transform: translateY(12px); }
.tab-visible { opacity: 1; transform: translateY(0); }
.tab-leave { transition: opacity 300ms var(--ease), transform 300ms var(--ease); }

/* ---------- Magazine (杂志式版式) ---------- */
.magazine {
  padding-block: 0 clamp(48px, 6vw, 80px);
}

.magazine-section-head {
  text-align: center;
  margin-bottom: clamp(16px, 2.5vw, 28px);
  padding-inline: clamp(16px, 3vw, 40px);
}

.magazine-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2vw, 32px);
  margin-inline: auto;
  max-width: 1760px;
  padding-inline: clamp(16px, 3vw, 40px);
  padding-block: clamp(10px, 1.8vh, 24px);
}

.magazine-row:first-child {
  padding-top: clamp(12px, 2vh, 24px);
}

.magazine-row:not([data-tight-stack="true"]) {
  padding-block: clamp(20px, 3.6vh, 48px);
}

.magazine-row[data-tight-stack="true"][data-orientation="square"] {
  margin-top: -8vh;
}

.magazine-row[data-tight-stack="true"][data-orientation="portrait"] {
  margin-top: -14vh;
}

.magazine-row[data-layout="left"] {
  flex-direction: row;
}

.magazine-row[data-layout="right"] {
  flex-direction: row-reverse;
}

.magazine-row[data-layout="center"] {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.magazine-row[data-edge-stack="true"]:not([data-layout="center"]) {
  justify-content: flex-start;
  max-width: 1900px;
}

.magazine-image {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: zoom-in;
  flex-shrink: 0;
  width: var(--img-w);
}

.home-load-reveal .magazine-image,
.home-load-reveal.archive-topic-photo {
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  transition: opacity 900ms var(--ease-cinema), transform 1100ms var(--ease-cinema);
  will-change: opacity, transform;
}

.home-load-reveal.is-visible .magazine-image,
.home-load-reveal.archive-topic-photo.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.magazine-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  background: var(--bg);
  transition: opacity 800ms var(--ease);
}

.magazine-row[data-orientation="portrait"] .magazine-image img {
  width: auto;
  max-width: 100%;
  max-height: calc(100vh - 132px);
}

.magazine-text-wrap {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  width: var(--text-w);
  align-self: center;
}

.home-load-reveal .magazine-text-wrap {
  opacity: 0;
  transform: translateX(var(--home-reveal-text-enter-x, 0));
  transition: opacity 760ms var(--ease-cinema) 220ms, transform 900ms var(--ease-cinema) 220ms;
  will-change: opacity, transform;
}

.home-load-reveal[data-layout="left"] {
  --home-reveal-text-enter-x: -26px;
}

.home-load-reveal[data-layout="right"] {
  --home-reveal-text-enter-x: 26px;
}

.home-load-reveal.is-visible .magazine-text-wrap {
  opacity: 1;
  transform: translateX(0);
}

.magazine-text-wrap--center {
  align-items: center;
  text-align: center;
}

.home-load-reveal[data-layout="center"] .magazine-text-wrap:first-child {
  transform: translateY(14px);
}

.home-load-reveal[data-layout="center"] .magazine-text-wrap:last-child {
  transform: translateY(-14px);
}

.home-load-reveal[data-layout="center"].is-visible .magazine-text-wrap {
  transform: translateY(0);
}

.magazine-row[data-layout="right"] .magazine-text-wrap {
  align-items: flex-end;
  text-align: right;
}

.magazine-row[data-layout="right"] .magazine-text {
  text-align: right;
}

.magazine-row[data-layout="right"] .magazine-text::before {
  margin: 0 3px 16px auto;
}

.magazine-meta {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--fg-quiet);
  margin: 0 0 12px;
}

.magazine-text {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(14px, 1.2vw, 17px);
  line-height: 1.9;
  color: var(--fg-muted);
  letter-spacing: 0.06em;
  max-width: 32ch;
  margin: 0;
}

.magazine-text::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--ink-ivory-soft);
  margin-bottom: 16px;
}

.magazine-text--no-dash::before {
  display: none;
}

@media (max-width: 880px) {
  .magazine-row,
  .magazine-row[data-layout="left"],
  .magazine-row[data-layout="right"] {
    flex-direction: column;
    gap: 16px;
    padding-inline: 0;
    padding-block: clamp(24px, 7vw, 44px);
    margin-top: 0 !important;
  }

  .magazine-row .magazine-image {
    align-self: center;
    margin-inline: auto;
    width: min(100%, 100vw - 2 * var(--mobile-gutter)) !important;
    max-width: 100%;
  }

  .magazine-row[data-orientation="portrait"] .magazine-image {
    width: min(76vw, 330px) !important;
  }

  .magazine-row[data-orientation="square"] .magazine-image {
    width: min(88vw, 380px) !important;
  }

  .magazine-row .magazine-text-wrap {
    width: min(100%, 34em) !important;
    align-items: center !important;
    text-align: center !important;
  }

  .magazine-row .magazine-text-wrap {
    margin-top: 4px;
    max-width: 100%;
  }

  .magazine-image img {
    width: 100%;
    max-width: 100%;
    max-height: 40dvh;
    object-fit: contain;
  }

  .magazine-row[data-orientation="portrait"] .magazine-image img {
    width: auto;
    max-height: min(48dvh, 440px);
  }

  .magazine-row[data-orientation="landscape"] .magazine-image img {
    max-height: min(38dvh, 330px);
  }

  .magazine-meta {
    margin-bottom: 8px;
    font-size: 11px;
    letter-spacing: 0.12em;
  }

  .magazine-text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 32em;
    font-size: 14px;
    line-height: 1.75;
    text-align: center;
  }

  .magazine-text::before {
    margin: 0 auto 12px;
  }

  .magazine-row[data-layout="right"] .magazine-text::before {
    margin-left: auto;
    margin-right: auto;
  }
}

/* ---------- Topic cards ---------- */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px;
  max-width: 1480px;
  margin: 0 auto;
}

.topic-grid--feature {
  grid-template-columns: 1fr;
  width: min(calc(100vw - 2 * clamp(20px, 5vw, 64px)), 1380px);
  max-width: 1380px;
  margin-left: 50%;
  transform: translateX(-50%);
}

.on-this-day-topic {
  display: grid;
  grid-template-columns: minmax(250px, 320px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding-block: clamp(12px, 2vw, 28px) clamp(28px, 4vw, 52px);
}

.on-this-day-copy {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.on-this-day-kicker {
  margin: 0;
  color: var(--ink-ivory);
  font-family: var(--serif);
  font-size: clamp(28px, 3.2vw, 46px);
  font-weight: 300;
  line-height: 1.22;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.on-this-day-blurb {
  margin: 0;
  max-width: 22em;
  color: var(--fg-muted);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.9;
  letter-spacing: 0.08em;
}

.on-this-day-frame {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: clamp(380px, 48vw, 620px);
  justify-self: stretch;
  transition: transform 500ms var(--ease-cinema);
}

.on-this-day-frame:hover {
  transform: translateY(-2px);
}

.on-this-day-mat {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: visible;
  background: transparent;
}

.on-this-day-mat img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  opacity: 1;
  transition: opacity 360ms var(--ease), transform 900ms var(--ease-cinema);
}

.on-this-day-mat img[data-orientation="landscape"] {
  width: auto;
  max-width: 100%;
}

.on-this-day-topic.is-switching .on-this-day-mat img {
  opacity: 0;
  transform: scale(0.992);
}

.on-this-day-topic.is-empty .on-this-day-mat {
  background: transparent;
}

.on-this-day-topic.is-empty {
  display: block;
  padding-block: 0 clamp(18px, 3vw, 34px);
}

.on-this-day-topic.is-empty .on-this-day-copy {
  max-width: 520px;
}

.on-this-day-topic.is-empty .on-this-day-frame {
  display: none;
}

.on-this-day-topic.is-empty .on-this-day-meta {
  min-height: 0;
}

.on-this-day-meta {
  display: grid;
  gap: 7px;
  min-height: 86px;
  color: var(--fg-muted);
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.65;
  letter-spacing: 0.08em;
}

.on-this-day-meta [data-on-this-day-date] {
  color: var(--ink-ivory);
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 300;
  letter-spacing: 0.1em;
}

.on-this-day-meta [data-on-this-day-caption] {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.on-this-day-meta [data-on-this-day-count] {
  color: var(--fg-quiet);
  white-space: nowrap;
}

.topic-return-button {
  position: fixed;
  top: calc(var(--home-header-height, 64px) + var(--home-tab-bar-full-height, 54px) + 12px);
  right: clamp(20px, 5vw, 64px);
  z-index: 46;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--tap-min);
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: var(--fg-muted);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.14em;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 240ms var(--ease), transform 320ms var(--ease-cinema), color 240ms var(--ease);
}

.topic-return-button::before {
  content: "";
  position: absolute;
  inset: -8px;
}

.topic-return-button svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

body.home-topic-return-visible .topic-return-button {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.topic-return-button:hover,
.topic-return-button:focus-visible {
  color: var(--ink-ivory);
}

.archive-topic-list {
  width: min(calc(100vw - 2 * clamp(20px, 5vw, 64px)), 1480px);
  max-width: none;
  margin: clamp(16px, 3vw, 36px) 50% 0;
  transform: translateX(-50%);
  border-top: 1px solid var(--line-soft);
}

.archive-topic {
  border-bottom: 0;
}

.archive-topic-toggle {
  position: relative;
  width: 100%;
  height: 164px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 0.8fr);
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  padding: clamp(44px, 4.8vw, 68px) clamp(14px, 2vw, 22px) clamp(28px, 3.4vw, 42px);
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: background 300ms var(--ease), transform 300ms var(--ease-cinema);
}

.archive-topic-toggle:hover,
.archive-topic-toggle:focus-visible,
.archive-topic.is-open .archive-topic-toggle {
  background: rgba(238, 231, 216, 0.035);
  outline: none;
}

.archive-topic-toggle::before {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  width: 96px;
  height: 1px;
  background: var(--article-accent-soft);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 400ms var(--ease-cinema);
}

.archive-topic-toggle:hover::before,
.archive-topic-toggle:focus-visible::before,
.archive-topic.is-open .archive-topic-toggle::before {
  transform: scaleX(1);
}

.archive-topic-title {
  color: var(--ink-ivory);
  font-family: var(--serif);
  font-size: clamp(30px, 3.4vw, 46px);
  font-weight: 300;
  line-height: 1.28;
  letter-spacing: 0.04em;
  white-space: nowrap;
  min-width: 0;
}

.archive-topic-action {
  position: absolute;
  top: 18px;
  right: clamp(14px, 2vw, 22px);
  color: var(--fg-muted);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0.12em;
  white-space: nowrap;
  transition: color 300ms var(--ease);
}

.archive-topic-toggle:hover .archive-topic-action,
.archive-topic-toggle:focus-visible .archive-topic-action,
.archive-topic.is-open .archive-topic-action {
  color: var(--ink-ivory);
}

.archive-topic-strip {
  --topic-thumb-w: clamp(78px, 7.4vw, 96px);
  --topic-thumb-h: calc(var(--topic-thumb-w) * 2 / 3);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: clamp(8px, 0.9vw, 12px);
  min-width: 0;
  height: 72px;
}

.archive-topic-strip--tags {
  flex-wrap: wrap;
  align-content: center;
  row-gap: 8px;
}

.archive-topic-description {
  display: none;
  justify-self: end;
  max-width: 38em;
  color: var(--fg-muted);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.9;
  letter-spacing: 0.08em;
}

.archive-topic.is-open .archive-topic-strip {
  display: none;
}

.archive-topic.is-open .archive-topic-description {
  display: block;
}

.archive-topic-thumb {
  flex: 0 0 var(--topic-thumb-w);
  width: var(--topic-thumb-w);
  height: var(--topic-thumb-h);
  overflow: hidden;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.archive-topic-thumb + .archive-topic-thumb {
  margin-left: 0;
}

.archive-topic-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.archive-topic-tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  color: var(--fg-muted);
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.archive-topic-tag + .archive-topic-tag::before {
  content: "·";
  margin-right: clamp(8px, 0.9vw, 12px);
  color: var(--fg-quiet);
}

.archive-topic-panel {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0;
  transform: translateY(-8px);
  transition: max-height 850ms var(--ease-cinema), opacity 420ms var(--ease), transform 520ms var(--ease-cinema), padding 520ms var(--ease);
}

.archive-topic.is-open .archive-topic-panel {
  max-height: 5200px;
  opacity: 1;
  padding: clamp(24px, 4vw, 56px) 0 clamp(34px, 5vw, 72px);
  transform: translateY(0);
}

.archive-topic--year.is-open .archive-topic-panel {
  max-height: 120000px;
}

.archive-topic-panel-action {
  display: flex;
  justify-content: center;
  margin: 0 0 clamp(24px, 4vw, 42px);
}

.archive-topic-empty {
  margin: 0;
  color: var(--fg-muted);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.8;
  text-align: center;
}

.archive-topic-gallery {
  display: flex;
  flex-direction: column;
  gap: clamp(34px, 6vw, 82px);
}

.archive-topic-photo {
  display: block;
  width: min(76%, 980px);
  background: transparent;
}

.archive-topic-photo:nth-child(even) {
  align-self: flex-end;
}

.archive-topic-photo:nth-child(odd) {
  align-self: flex-start;
}

.archive-topic-photo--portrait {
  width: min(38%, 460px);
}

.archive-topic-photo--near-left {
  margin-inline: 18% auto;
}

.archive-topic-photo--near-right {
  margin-inline: auto 18%;
}

.archive-topic-photo--square {
  width: min(52%, 620px);
}

.archive-topic-photo img {
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: transform 600ms var(--ease-cinema);
}

.archive-topic-photo:hover img,
.archive-topic-photo:focus-visible img {
  transform: scale(1.03);
}

.topic-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  text-decoration: none;
  transition: border-color 400ms var(--ease), transform 400ms var(--ease);
  overflow: hidden;
}

.topic-card:hover {
  border-color: var(--line);
  transform: translateY(-2px);
}

.topic-card-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.topic-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 600ms var(--ease-cinema);
}

.topic-card:hover .topic-card-cover img {
  transform: scale(1.03);
}

.topic-card-body {
  padding: clamp(16px, 2vw, 24px);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.topic-card-title {
  font-family: var(--serif);
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 400;
  margin: 0;
  line-height: 1.3;
  color: var(--fg);
}

.topic-card-stats {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--fg-muted);
  margin: 0;
  letter-spacing: 0.04em;
}

.topic-card-blurb {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--fg-muted);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 760px) {
  .topic-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .on-this-day-topic {
    grid-template-columns: 1fr;
    gap: 18px;
    padding-bottom: 34px;
  }
  .on-this-day-frame {
    height: clamp(300px, 82vw, 520px);
  }
  .on-this-day-blurb {
    max-width: none;
  }
  .on-this-day-kicker {
    white-space: normal;
  }
  .on-this-day-meta {
    min-height: 76px;
  }
  .on-this-day-meta [data-on-this-day-caption] {
    white-space: normal;
  }
  .archive-topic-list {
    width: 100%;
    margin-top: 18px;
  }
  .topic-return-button {
    top: calc(var(--home-header-height, 64px) + var(--home-tab-bar-full-height, 54px) + 10px);
    right: var(--mobile-gutter);
  }
  .archive-topic-toggle {
    height: auto;
    min-height: 152px;
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 44px 0 24px;
  }
  .archive-topic-title {
    white-space: normal;
  }
  .archive-topic-strip {
    --topic-thumb-w: clamp(58px, 17vw, 74px);
    justify-content: flex-start;
    height: 58px;
  }
  .archive-topic-strip--tags {
    height: auto;
    min-height: 58px;
    gap: 8px 12px;
  }
  .archive-topic-tag {
    min-height: 28px;
    font-size: 11px;
  }
  .archive-topic-tag + .archive-topic-tag::before {
    margin-right: 8px;
  }
  .archive-topic-description {
    justify-self: start;
    max-width: none;
    font-size: 13px;
  }
  .archive-topic-action {
    top: 18px;
    right: 0;
  }
  .archive-topic-gallery {
    gap: 34px;
  }
  .archive-topic-photo {
    align-self: center;
    margin-inline: auto;
    width: 100%;
  }
  .archive-topic-photo:nth-child(even),
  .archive-topic-photo:nth-child(odd) {
    align-self: center;
  }
  .archive-topic-photo--portrait {
    width: 64%;
  }
  .archive-topic-photo--near-left {
    margin-inline: auto;
  }
  .archive-topic-photo--near-right {
    margin-inline: auto;
  }
  .archive-topic-photo--square {
    width: 82%;
  }
  .topic-card-cover {
    height: clamp(180px, 22vw, 320px);
  }
}

/* ---------- Year cards ---------- */
.year-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: clamp(20px, 3vw, 40px);
  max-width: 1480px;
  margin: 0 auto;
  padding-inline: clamp(20px, 5vw, 64px);
}

.year-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  aspect-ratio: 3 / 4;
  padding: clamp(24px, 3vw, 36px);
  background: var(--bg-soft);
  border: 1px solid var(--ink-ivory-faint);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 500ms var(--ease), transform 600ms var(--ease-cinema);
  text-decoration: none;
}

.year-card:hover {
  border-color: rgba(237, 230, 211, 0.35);
  transform: translateY(-2px);
}

.year-card-number {
  font-family: var(--serif);
  font-size: clamp(48px, 6vw, 72px);
  font-weight: 300;
  color: var(--ink-ivory);
  line-height: 1;
}

.year-card-blurb {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--fg-muted);
  margin-top: 12px;
}

.year-page-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.year-page-stats span {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid var(--line-soft);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
}

.year-page-cities {
  max-width: 38em;
  margin: 14px auto 0;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.8;
  color: var(--fg-muted);
}

@media (max-width: 760px) {
  .year-grid {
    grid-template-columns: 1fr;
    padding-inline: 0;
  }

  .year-card {
    min-height: 164px;
    aspect-ratio: auto;
  }

  .year-card-number {
    font-size: clamp(40px, 12vw, 56px);
  }

  .year-page-stats {
    justify-content: flex-start;
  }

  .year-page-stats span {
    min-height: var(--tap-min);
  }

  .year-page-cities {
    text-align: left;
  }
}

/* ---------- Filter toggle (Photography page) ---------- */
.filter-toggle {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
  background: transparent;
  border: 1px solid var(--line);
  min-height: var(--tap-min);
  padding: 10px 16px;
  cursor: pointer;
  transition: color 400ms var(--ease), border-color 400ms var(--ease);
  white-space: nowrap;
}

.filter-toggle:hover {
  color: var(--ink-ivory);
  border-color: var(--ink-ivory-soft);
}

@media (max-width: 760px) {
  .gallery-head {
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 16px;
  }

  .gallery-head-actions {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .gallery-sort-note {
    top: calc(100% + 4px);
    font-size: 11px;
    text-align: right;
  }

  .gallery-head-actions > * {
    flex: 0 0 auto;
    justify-content: center;
  }

  .filter-toggle,
  .gallery-map-link {
    font-size: 11px;
    min-height: var(--tap-min);
    padding: 8px 12px;
  }

  .gallery-map-link svg {
    width: 13px;
    height: 13px;
  }

  .filter-summary {
    display: block;
    margin: 0 0 12px;
  }

  .filter-group.is-open {
    display: flex;
    flex-direction: column;
    max-height: min(70dvh, 620px);
    margin-block: 12px 24px;
    padding: 14px 0 18px;
    border-top: 1px solid var(--line-soft);
  }

  .filter-row {
    gap: 8px;
    margin-bottom: var(--mobile-panel-gap);
    padding-bottom: var(--mobile-panel-gap);
    border-bottom: 1px solid var(--line-soft);
  }

  .filter-row[data-row="year"] { order: -1; }

  .filter-row::before {
    content: attr(aria-label);
    flex: 0 0 100%;
    font-family: var(--sans);
    font-size: 11px;
    line-height: 1.4;
    letter-spacing: 0.16em;
    color: var(--fg-quiet);
    margin-bottom: 2px;
  }

  .filter-chip {
    flex: 0 0 auto;
    min-width: 76px;
    text-align: center;
  }

  .filter-actions {
    position: sticky;
    bottom: 0;
    display: flex;
    gap: 10px;
    padding-top: 12px;
    background: linear-gradient(180deg, rgba(10, 10, 10, 0), var(--bg) 28%);
  }

  .filter-action {
    flex: 1 1 0;
  }
}

/* ---------- Spacing tighten ---------- */
.section { padding-block: var(--section-pad); }
.section--first { padding-top: var(--nav-gap); }

.site-main > section:first-child,
.site-main > .section--first:first-child,
.site-main > .journal-index:first-child {
  padding-top: 0;
}

/* ---------- Map wall: polaroids ---------- */
.polaroid-object {
  overflow: visible;
  opacity: 0;
  transform: scale(var(--wall-polaroid-inner-scale, 1));
  transform-box: fill-box;
  transform-origin: center center;
  animation: polaroidPinIn 980ms var(--ease-cinema) forwards;
  animation-delay: var(--delay, 0ms);
  will-change: transform, opacity;
}

.china-map .map-wall-svg--mobile {
  display: none;
}

.polaroid {
  display: block;
  position: relative;
  background: #f5f1e8;
  padding: 5px 5px 14px;
  border-radius: 2px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.45), 0 1px 2px rgba(0,0,0,0.3);
  transform: rotate(var(--rot, 0deg));
  transition: transform 400ms var(--ease-cinema), box-shadow 400ms var(--ease);
  width: var(--w, 64px);
  text-decoration: none;
}

.polaroid::before {
  content: "";
  position: absolute;
  inset: -12px;
}

.polaroid:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.55), 0 2px 4px rgba(0,0,0,0.35);
  transform: rotate(var(--rot, 0deg)) translateY(-2px);
  cursor: pointer;
}

.polaroid:active {
  transform: rotate(var(--rot, 0deg)) scale(0.98);
}

.polaroid img {
  width: 100%;
  height: var(--image-h, 48px);
  object-fit: cover;
  display: block;
  filter: saturate(0.92);
}

/* Wall lines */
.wall-thread {
  fill: none;
  stroke: rgba(237, 230, 211, 0.4);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: wallThreadDraw 1100ms var(--ease-cinema) forwards;
  animation-delay: var(--delay, 0ms);
}

.china-map--wall.is-pannable .wall-thread {
  animation: none;
  opacity: 1;
  stroke-dasharray: none;
  stroke-dashoffset: 0;
}

.wall-pin {
  opacity: 0;
  transform: scale(var(--wall-pin-inner-scale, 1));
  transform-box: fill-box;
  transform-origin: center center;
  animation: wallCityPinDrop 720ms var(--ease-cinema) forwards;
  animation-delay: var(--delay, 0ms);
  will-change: transform, opacity;
}

.wall-pin-hit {
  pointer-events: all;
  transform: scale(var(--wall-pin-inner-scale, 1));
  transform-box: fill-box;
  transform-origin: center center;
}

.wall-pin circle:first-child {
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4));
}

.polaroid-small-pin {
  opacity: 0;
  transform-origin: center center;
  animation: wallSmallPinDrop 640ms var(--ease-cinema) forwards;
  animation-delay: var(--pin-delay, 0ms);
}

@media (max-width: 760px), (max-width: 900px) and (orientation: landscape) {
  .china-map .map-wall-svg--desktop {
    display: none;
  }

  .china-map .map-wall-svg--mobile {
    display: block;
  }

  .map-wall-svg--mobile .polaroid {
    padding: 3px 3px 9px;
    box-shadow: 0 2px 7px rgba(0,0,0,0.48), 0 1px 2px rgba(0,0,0,0.32);
  }

  .map-wall-svg--mobile .polaroid::before {
    inset: -8px;
  }

  .map-wall-svg--mobile .polaroid-small-pin {
    transform: scale(0.78);
    transform-origin: center center;
  }

  .map-wall-svg--mobile .wall-thread {
    stroke-width: 0.75;
  }
}

@keyframes wallCityPinDrop {
  0% { opacity: 0; transform: translateY(-16px) scale(calc(var(--wall-pin-inner-scale, 1) * 1.35)); }
  68% { opacity: 1; transform: translateY(1px) scale(calc(var(--wall-pin-inner-scale, 1) * 0.94)); }
  100% { opacity: 1; transform: translateY(0) scale(var(--wall-pin-inner-scale, 1)); }
}

@keyframes polaroidPinIn {
  0% { opacity: 0; transform: translateY(-14px) scale(calc(var(--wall-polaroid-inner-scale, 1) * 0.96)); }
  70% { opacity: 1; transform: translateY(1px) scale(calc(var(--wall-polaroid-inner-scale, 1) * 1.01)); }
  100% { opacity: 1; transform: translateY(0) scale(var(--wall-polaroid-inner-scale, 1)); }
}

@keyframes wallSmallPinDrop {
  0% { opacity: 0; transform: translateY(-10px) scale(1.45); }
  72% { opacity: 1; transform: translateY(1px) scale(0.9); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes wallThreadDraw {
  from { stroke-dashoffset: 1; opacity: 0; }
  to { stroke-dashoffset: 0; opacity: 1; }
}

/* ---------- prefers-reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal, .reveal-up {
    opacity: 1 !important;
    transform: none !important;
  }
}
