/* A real photo stack invites the reader to open every chapter. */
.chapter-album summary{display:grid;grid-template-columns:250px minmax(0,1fr) 30px;gap:35px;padding:25px 8px;min-height:205px;isolation:isolate}
.album-summary-copy{display:flex;flex-direction:column;align-items:flex-start;gap:9px;min-width:0}
.album-summary-label{font:22px/1.7 var(--serif);letter-spacing:.02em}
.album-summary-count{font:14px/1.7 var(--sans);color:var(--chapter-accent,#945468)}
.album-summary-hint{font-size:14px;line-height:1.9;color:var(--chapter-muted,#806b71)}
.album-summary-icon{margin-left:0;align-self:center;font-size:28px}
.album-preview{position:relative;width:240px;height:160px;display:block;justify-self:center;pointer-events:none}
.album-preview-photo{position:absolute;left:calc(50% - 49px);top:12px;display:block;width:98px;height:132px;padding:5px 5px 15px;background:#fffcf6;box-shadow:0 4px 14px #40233218;transform:translateX(calc((var(--stack-order) - 1.5)*18px)) translateY(calc(var(--stack-order)*-2px)) rotate(calc((var(--stack-order) - 1.5)*8deg));transition:transform .48s var(--ease),box-shadow .4s;transform-origin:50% 90%}
.album-preview-photo img{width:100%;height:100%;object-fit:cover}
.chapter-album summary:hover .album-preview-photo,.chapter-album summary:focus-visible .album-preview-photo,.chapter-album[open] .album-preview-photo{transform:translateX(calc((var(--stack-order) - 1.5)*34px)) translateY(calc(var(--stack-order)*-3px)) rotate(calc((var(--stack-order) - 1.5)*10deg));box-shadow:0 7px 18px #4023321c}
.chapter-album-panel{min-width:0;transform-origin:50% 0}
.waiting-to-lay{opacity:0}
.chapter-album-controls .chapter-collapse{display:block;margin:22px auto 0;min-height:48px;border-color:#b99ba4;padding:10px 28px;background:#ffffff38}
.chapter-album-controls .chapter-collapse:hover{background:#ffffff80}

/* The viewer has a steady stage; the photographs move within it. */
.lightbox{max-width:min(1100px,94vw);max-height:calc(100svh - 24px)}
.lightbox-stage{position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:min(62svh,700px);overflow:hidden;isolation:isolate}
.lightbox-stage>#lightbox-image{display:block;width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain;box-shadow:0 15px 60px #10050b40;transform-origin:center;touch-action:pan-y pinch-zoom}
.lightbox-slide-copy{position:absolute;left:50%;top:50%;max-width:none;max-height:none;object-fit:contain;transform:translate(-50%,-50%);pointer-events:none;z-index:2}
.lightbox.is-traveling .lightbox-stage{overflow:visible}
.lightbox-info{min-height:45px}
.lightbox-info p{max-width:85%;font-size:17px}
.lightbox-close,.lightbox-info,.lightbox-controls{transition:opacity .22s}
.lightbox.is-closing .lightbox-close,.lightbox.is-closing .lightbox-info,.lightbox.is-closing .lightbox-controls{opacity:0}

@media(max-width:760px){
  .chapter-album summary{grid-template-columns:minmax(0,1fr) 27px;gap:12px 14px;padding:18px 2px 24px;min-height:0}
  .album-preview{grid-column:1/-1;width:220px;height:150px;margin:0 auto 0}
  .album-summary-copy{gap:7px}.album-summary-label{font-size:19px}.album-summary-count{font-size:13px}.album-summary-hint{font-size:13px;line-height:1.9}
  .album-preview-photo{width:91px;height:125px;left:calc(50% - 45.5px);top:10px}
  .lightbox{padding:47px 17px 17px;max-width:100%;width:100%}
  .lightbox-stage{height:59svh}.lightbox-info{gap:12px;margin-top:16px}.lightbox-info p{font-size:16px;max-width:84%;line-height:1.8}
  .lightbox-controls{margin-top:17px}.lightbox-controls button{padding:9px 17px;font-size:14px}.lightbox-help{font-size:12px;line-height:1.7;max-width:145px}
}
@media(max-width:380px){.album-preview{width:210px}.album-summary-label{font-size:18px}.lightbox-info p{font-size:15px}.lightbox-controls button{padding:9px 14px}.lightbox-help{font-size:11px;max-width:130px}}
@media(max-height:650px){.lightbox-stage{height:48svh}.lightbox-info{margin-top:12px}.lightbox-controls{margin-top:12px}}

@media(prefers-reduced-motion:no-preference){
  .lightbox[open]::backdrop{animation:viewer-backdrop-in .36s ease both}
  .lightbox.is-closing::backdrop{animation:viewer-backdrop-out .34s ease both}
  .lightbox[open]:not(.is-closing) .lightbox-info{animation:viewer-caption-in .48s .08s ease both}
  .xian-film.reveal.visible>.chapter-photo{animation:film-frame-arrive .72s var(--ease) both}
  .xian-film.reveal.visible>.chapter-photo:nth-child(2){animation-delay:.09s}.xian-film.reveal.visible>.chapter-photo:nth-child(3){animation-delay:.18s}
  .city-diary.reveal.visible .city-main{animation:postcard-main-land .8s var(--ease) both}
  .city-diary.reveal.visible .city-day{animation:postcard-day-land .8s .12s var(--ease) both}
  .city-diary.reveal.visible .city-night{animation:postcard-night-land .8s .24s var(--ease) both}
  .nature-opening.reveal.visible .nature-waterfall{animation:nature-paper-place .9s var(--ease) both}
  .nature-opening.reveal.visible .nature-rafting{animation:nature-rafting-place .9s .16s var(--ease) both}
  @keyframes film-frame-arrive{from{opacity:0;transform:translateX(22px) rotate(2deg)}to{opacity:1;transform:none}}
  @keyframes postcard-main-land{from{opacity:0;transform:translate(-24px,-35px) rotate(-11deg) scale(.96)}to{opacity:1;transform:rotate(-4deg)}}
  @keyframes postcard-day-land{from{opacity:0;transform:translate(24px,-30px) rotate(13deg) scale(.96)}to{opacity:1;transform:rotate(5deg)}}
  @keyframes postcard-night-land{from{opacity:0;transform:translate(30px,28px) rotate(-12deg) scale(.96)}to{opacity:1;transform:rotate(-5deg)}}
  @keyframes nature-paper-place{from{opacity:0;transform:translateY(35px) rotate(3deg) scale(.97)}to{opacity:1;transform:rotate(-2deg)}}
  @keyframes nature-rafting-place{from{opacity:0;transform:translate(20px,30px) rotate(-3deg) scale(.95)}to{opacity:1;transform:rotate(4deg)}}
  @keyframes viewer-backdrop-in{from{background:#1f0d1600;backdrop-filter:blur(0)}to{background:#1f0d16f5;backdrop-filter:blur(12px)}}
  @keyframes viewer-backdrop-out{from{background:#1f0d16f5;backdrop-filter:blur(12px)}to{background:#1f0d1600;backdrop-filter:blur(0)}}
  @keyframes viewer-caption-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
}
@media(prefers-reduced-motion:reduce){.album-preview-photo,.lightbox-close,.lightbox-info,.lightbox-controls{transition:none}.waiting-to-lay{opacity:1}}
