@font-face {
  font-family: "Source Serif 4";
  src: url("assets/fonts/source-serif-4.woff2") format("woff2");
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #f3f0e7;
  --paper-deep: #e5e7df;
  --ink: #293f46;
  --muted: #52666b;
  --line: rgba(41,78,121,.17);
  --blue: #294e79;
  --lake: #4f91a7;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Source Serif 4", "Songti SC", STSong, serif;
  --font-sans: "Noto Sans SC", "Source Han Sans SC", "Segoe UI Variable", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; }
html { scrollbar-color: var(--blue) var(--paper-deep); }
body {
  overflow: hidden;
  overscroll-behavior: none;
  background:
    linear-gradient(rgba(41,78,121,.032) 1px, transparent 1px) 0 0 / 100% 12.5vh,
    linear-gradient(90deg, rgba(41,78,121,.024) 1px, transparent 1px) 0 0 / 12.5vw 100%,
    var(--paper);
}
button { font: inherit; }
::selection { color: #fff; background: var(--blue); }
body[data-title-font="sans"] h1 { font-family: var(--font-sans); font-weight: 520; letter-spacing: .02em; }
body[data-title-font="fangsong"] h1 { font-family: "STFangsong", "FangSong", var(--font-serif); font-weight: 400; letter-spacing: .06em; }
body[data-caption-font="sans"] .caption-category,
body[data-caption-font="sans"] .tile-title,
body[data-caption-font="sans"] .lightbox figcaption { font-family: var(--font-sans); }
body[data-caption-font="fangsong"] .caption-category,
body[data-caption-font="fangsong"] .tile-title,
body[data-caption-font="fangsong"] .lightbox figcaption { font-family: "STFangsong", "FangSong", var(--font-serif); }

.header, .footer {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 2000;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}
.header {
  top: 0;
  align-items: flex-start;
  padding: max(24px, env(safe-area-inset-top)) 32px 0;
}
h1 {
  position: relative;
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(25px, 2.7vw, 42px);
  color: var(--ink);
  font-weight: 450;
  line-height: .94;
  letter-spacing: .035em;
}
.brand-subtitle {
  display: block;
  width: max-content;
  margin-top: 9px;
  padding-top: 7px;
  border-top: 3px solid var(--blue);
  color: var(--muted);
  font: 650 10px/1 var(--font-sans);
  letter-spacing: .12em;
}
.views {
  --view-gap: 6px;
  --view-width: 82px;
  position: relative;
  display: flex;
  align-items: stretch;
  gap: var(--view-gap);
  padding-bottom: 8px;
  pointer-events: auto;
  border-bottom: 1px solid var(--line);
  background: transparent;
}
.views::after {
  content: "";
  position: absolute;
  left: 9px;
  bottom: -2px;
  width: calc(var(--view-width) - 18px);
  height: 4px;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 2px 8px rgba(41,78,121,.24);
  transform: translateX(0) scaleX(1);
  transform-origin: center;
  transition: transform .5s cubic-bezier(.16,1,.3,1), box-shadow .28s ease;
}
.views:has(.view-pill:nth-child(2)[aria-pressed="true"])::after {
  transform: translateX(calc(var(--view-width) + var(--view-gap))) scaleX(1);
}
.views:has(.view-pill:nth-child(3)[aria-pressed="true"])::after {
  transform: translateX(calc(var(--view-width) + var(--view-width) + var(--view-gap) + var(--view-gap))) scaleX(1);
}
.view-pill {
  position: relative;
  min-width: 82px;
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .04em;
  cursor: pointer;
  transition: color .18s ease;
}
.view-pill::before {
  content: "0" counter(view);
  counter-increment: view;
  margin-right: 7px;
  color: var(--lake);
  font-size: 9px;
  vertical-align: 2px;
}
.views { counter-reset: view; }
.view-pill:hover { color: var(--ink); }
.view-pill[aria-pressed="true"] { color: var(--blue); }
.view-pill[aria-pressed="true"]::before { color: var(--blue); }
.view-pill:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.collection {
  position: fixed;
  inset: 0;
  overflow: hidden;
  touch-action: none;
  outline: none;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}
.collection::before {
  content: "DL";
  position: absolute;
  left: 50%;
  top: 50%;
  color: rgba(41,78,121,.022);
  font: 800 clamp(180px, 34vw, 560px)/.75 var(--font-sans);
  letter-spacing: -.12em;
  transform: translate(-52%, -52%);
  pointer-events: none;
}
.collection::after {
  content: "";
  position: absolute;
  inset: 103px 32px 115px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  pointer-events: none;
}
.collection:active { cursor: grabbing; }
.collection:focus-visible::after { border-color: var(--blue); }
.orbit { position: absolute; inset: 0; }

.work {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 180px;
  aspect-ratio: 3 / 4;
  margin: 0;
  padding: 5px;
  visibility: hidden;
  background: #fff;
  box-shadow: 0 10px 24px rgba(42,54,48,.15);
  backface-visibility: hidden;
  transform-origin: center;
  will-change: transform, opacity;
  cursor: zoom-in;
  outline: 1px solid transparent;
  outline-offset: 2px;
  transition: background-color .2s ease, box-shadow .2s ease;
}
.work img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
}
.work .photo-front { position: relative; z-index: 1; }
@media (hover: hover) and (pointer: fine) {
  .work:hover {
    outline-color: var(--lake);
    box-shadow: 0 18px 38px rgba(42,54,48,.24);
  }
}
.tile-caption { display: none; }

.center-mark {
  position: absolute;
  left: 50%;
  top: 52%;
  z-index: 1900;
  display: grid;
  place-items: center;
  gap: 12px;
  pointer-events: none;
  transform: translate(-50%,-50%);
  transition: top .55s cubic-bezier(.2,.75,.25,1), opacity .3s ease;
}
.center-mark span {
  font-family: var(--font-serif);
  font-size: clamp(13px, 1.15vw, 16px);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: .025em;
  white-space: nowrap;
}
.collection[data-view="ring"] .center-mark { top: 50%; }
.collection[data-view="ring"] .center-mark span {
  max-width: min(34vw, 240px);
  font-size: clamp(11px, .95vw, 14px);
  letter-spacing: .015em;
  text-align: center;
}
.collection[data-view="ring"]::before { color: rgba(41,78,121,.014); }

.collection[data-view="gallery"] {
  overflow-y: auto;
  touch-action: pan-y;
  cursor: default;
  padding: 124px 32px 132px;
}
.collection[data-view="gallery"]::before,
.collection[data-view="gallery"]::after { display: none; }
.collection[data-view="gallery"] .orbit {
  position: static;
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 34px 18px;
}
.collection[data-view="gallery"] .work {
  position: relative;
  left: auto;
  top: auto;
  width: 100%;
  visibility: visible !important;
  opacity: 1 !important;
  transform: none !important;
  z-index: auto !important;
}
.collection[data-view="gallery"] .tile-caption {
  display: flex;
  align-items: baseline;
  gap: 8px;
  position: absolute;
  left: 4px;
  top: calc(100% + 10px);
}
.collection[data-view="gallery"] .tile-title {
  color: var(--ink);
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 13px;
  line-height: 1;
}
.collection[data-view="gallery"] .tile-place {
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
  letter-spacing: .04em;
}
.collection[data-view="gallery"] .tile-place::before { content: "·"; margin-right: 8px; }
.collection[data-view="gallery"] .center-mark { opacity: 0; visibility: hidden; }

body:has(.collection[data-view="gallery"]) .header {
  padding-bottom: 48px;
  background: linear-gradient(to bottom, rgba(243,240,231,.98) 0 65%, rgba(243,240,231,0));
}
.collection[data-view="gallery"] ~ .footer {
  padding-top: 58px;
  background: linear-gradient(to top, rgba(243,240,231,.98) 0 62%, rgba(243,240,231,0));
}
.footer {
  bottom: 0;
  align-items: flex-end;
  padding: 0 32px max(28px, env(safe-area-inset-bottom));
}
.memory-caption {
  position: relative;
  display: grid;
  grid-template-columns: auto auto;
  gap: 5px 12px;
  min-width: 0;
  padding-left: 17px;
}
.memory-caption::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lake);
}
.caption-category {
  font-family: var(--font-serif);
  font-size: clamp(24px, 2.3vw, 34px);
  color: var(--ink);
  font-weight: 350;
  line-height: 1;
}
.caption-details {
  align-self: end;
  padding-bottom: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}
.source-note {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 450;
  line-height: 1;
  letter-spacing: .045em;
  white-space: nowrap;
  opacity: .72;
}
.collection[data-view="gallery"] ~ .footer .memory-caption { grid-template-columns: auto auto; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: grid;
  grid-template-columns: minmax(62px,1fr) minmax(0,auto) minmax(62px,1fr);
  align-items: center;
  padding: 40px 24px 28px;
  background: rgba(31,45,50,.975);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .34s cubic-bezier(.22,.7,.2,1), visibility 0s linear .34s;
}
.lightbox[aria-hidden="false"] { opacity: 1; visibility: visible; pointer-events: auto; transition-delay: 0s; }
.lightbox-figure {
  grid-column: 2;
  display: grid;
  place-items: center;
  gap: 15px;
  margin: 0;
  opacity: 0;
  transform: translateY(18px) scale(.92);
  transition: opacity .3s ease, transform .48s cubic-bezier(.16,.85,.25,1);
  touch-action: none;
}
.lightbox[aria-hidden="false"] .lightbox-figure { opacity: 1; transform: none; }
.lightbox.from-collection .lightbox-figure { opacity: 1; transform: none; transition: none; }
.lightbox.from-collection .lightbox-figure img { opacity: 0; }
.lightbox img {
  display: block;
  max-width: min(76vw,1000px);
  max-height: 80vh;
  padding: 7px;
  object-fit: contain;
  background: #fff;
  box-shadow: 0 26px 90px rgba(0,0,0,.65);
  cursor: zoom-in;
  transform: translate3d(0,0,0) scale(1);
  transform-origin: center;
  transition: transform .18s cubic-bezier(.2,.8,.2,1);
}
.lightbox.is-zoomed img { cursor: grab; }
.lightbox.is-panning img { cursor: grabbing; transition: none; }
.lightbox figcaption {
  color: #d8ddd8;
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: .06em;
  text-align: center;
}
.lightbox-close, .lightbox-fullscreen, .lightbox-nav {
  color: #f4f6f2;
  cursor: pointer;
  opacity: 0;
  transition: opacity .22s ease .16s, transform .34s cubic-bezier(.2,.8,.2,1) .1s, background-color .18s ease, color .18s ease;
}
.lightbox-fullscreen {
  position: absolute;
  right: 112px;
  top: 15px;
  z-index: 2;
  width: 94px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.30);
  background: transparent;
}
.lightbox-fullscreen svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; transition: transform .22s ease; }
.lightbox-fullscreen::before { content: "FULL"; color: #aeb5b0; font-size: 9px; font-weight: 650; letter-spacing: .14em; transition: color .18s ease; }
.lightbox-fullscreen[aria-pressed="true"]::before { content: "EXIT"; }
.lightbox-close {
  position: absolute;
  right: 22px;
  top: 15px;
  z-index: 2;
  width: 76px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.30);
  background: transparent;
}
.lightbox-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: round; transition: transform .22s ease; }
.lightbox-close::before { content: "CLOSE"; color: #aeb5b0; font-size: 9px; font-weight: 650; letter-spacing: .14em; transition: color .18s ease; }
.lightbox-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 82px;
  height: 54px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.30);
  background: transparent;
}
.lightbox-nav::after { color: #aeb5b0; font-size: 9px; font-weight: 650; letter-spacing: .14em; transition: color .18s ease; }
.lightbox-prev::after { content: "PREV"; }
.lightbox-next::after { content: "NEXT"; }
.lightbox-nav svg {
  width: 36px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .24s cubic-bezier(.2,.8,.2,1);
}
.lightbox-prev { left: clamp(18px, 4vw, 64px); transform: translate(-12px,-50%); }
.lightbox-next { right: clamp(18px, 4vw, 64px); transform: translate(12px,-50%); }
.lightbox[aria-hidden="false"] .lightbox-close,
.lightbox[aria-hidden="false"] .lightbox-fullscreen { opacity: 1; }
.lightbox[aria-hidden="false"] .lightbox-nav { opacity: .7; transform: translate(0,-50%); }
.lightbox-nav:hover, .lightbox-nav:focus-visible, .lightbox-close:hover, .lightbox-close:focus-visible, .lightbox-fullscreen:hover, .lightbox-fullscreen:focus-visible { opacity: 1; color: #fff; background: transparent; border-color: var(--blue); }
.lightbox-nav:hover::after, .lightbox-nav:focus-visible::after, .lightbox-close:hover::before, .lightbox-close:focus-visible::before, .lightbox-fullscreen:hover::before, .lightbox-fullscreen:focus-visible::before { color: #78b4c3; }
.lightbox-prev:hover svg, .lightbox-prev:focus-visible svg { transform: translateX(-5px); }
.lightbox-next:hover svg, .lightbox-next:focus-visible svg { transform: translateX(5px); }
.lightbox-close:hover svg, .lightbox-close:focus-visible svg { transform: rotate(90deg); }
.lightbox-fullscreen:hover svg, .lightbox-fullscreen:focus-visible svg { transform: scale(1.12); }
.lightbox-nav:focus-visible, .lightbox-close:focus-visible, .lightbox-fullscreen:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.lightbox:fullscreen { width: 100vw; height: 100vh; }
.lightbox-open .header, .lightbox-open .footer, .lightbox-open .collection { pointer-events: none; }

@media (max-width: 900px) {
  .collection[data-view="gallery"] .orbit { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 700px) {
  .views { --view-width: 68px; }
  .header { padding: max(20px, env(safe-area-inset-top)) 20px 0; }
  .brand-subtitle { font-size: 9px; }
  .view-pill { min-width: 68px; padding-inline: 8px; }
  .view-pill::before { display: none; }
  .collection::after { inset: 100px 20px 108px; }
  .footer { padding: 0 20px max(22px, env(safe-area-inset-bottom)); }
  .collection[data-view="gallery"] { padding: 116px 20px 116px; }
}
@media (hover: none), (pointer: coarse) {
  .lightbox-fullscreen { display: none; }
}
.work.is-touch-selected {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
@media (max-width: 520px) {
  .header { align-items: flex-start; gap: 10px; padding: max(18px, env(safe-area-inset-top)) 18px 0; }
  h1 { font-size: 22px; }
  .brand-subtitle { letter-spacing: .07em; }
  .views { --view-gap: 0px; --view-width: 54px; transform: translateY(-2px); }
  .view-pill { min-width: 54px; min-height: 30px; padding: 0 5px; font-size: 11px; }
  .collection[data-view="gallery"] { padding: 105px 12px 106px; }
  .collection[data-view="gallery"] .orbit { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 30px 10px; }
  .collection[data-view="ring"] .center-mark { top: 28%; }
  .collection[data-view="ring"] .center-mark span { max-width: none; font-size: 10px; letter-spacing: .01em; }
  .footer { position: fixed; display: block; }
  .memory-caption { display: flex; align-items: baseline; gap: 8px; width: calc(100vw - 40px); max-width: none; margin-bottom: 16px; }
  .caption-category { flex: 0 1 auto; min-width: 0; overflow: visible; font-size: clamp(15px, 4.7vw, 19px); white-space: nowrap; }
  .caption-details { flex: 0 0 auto; white-space: nowrap; }
  .source-note { position: absolute; right: 18px; bottom: max(7px, env(safe-area-inset-bottom)); font-size: 8px; transform: none; }
  .lightbox { grid-template-columns: 44px minmax(0,1fr) 44px; padding: 58px 8px 24px; }
  .lightbox img { max-width: calc(100vw - 104px); max-height: 74vh; }
  .lightbox-nav { width: 42px; height: 48px; border-bottom: 1px solid rgba(255,255,255,.30); }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .lightbox-nav::after { display: none; }
  .lightbox-close { width: 48px; }
  .lightbox-close::before { display: none; }
  .lightbox-nav svg { width: 29px; }
  .lightbox-close { right: 7px; top: 5px; }
}
@media (max-height: 520px) and (min-width: 580px) {
  .header { padding-top: 12px; }
  .footer { padding-bottom: 12px; }
  .center-mark span { font-size: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  .work { will-change: auto; }
  .views::after, .view-pill, .center-mark, .lightbox, .lightbox-figure, .lightbox-close, .lightbox-fullscreen, .lightbox-nav, .lightbox img { transition: none; }
}
