/* Photo book: the photos as loose prints on the paper, grouped per day, tap to enlarge. */
html, body { height: auto; overflow: auto; }
.fb-back { position: fixed; top: calc(14px + env(safe-area-inset-top, 0px)); left: 16px; z-index: 20; }
.fb-back .ico { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fb-wrap { max-width: 1120px; margin: 0 auto; padding: calc(72px + env(safe-area-inset-top, 0px)) 24px 96px; }
.fb-head { text-align: center; margin-bottom: 48px; }
.fb-logo { width: min(320px, 70vw); margin: 0 auto 18px; }
.fb-head h1 { font-weight: 500; font-size: 30px; letter-spacing: -.02em; line-height: 1.1; margin: 0; }
.fb-sub { margin: 6px 0 0; color: var(--label); }

.fb-grid { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 36px 32px; }
.fb-photo { display: block; width: min(330px, 100%); border: 0; padding: clamp(6px, 1vw, 12px); background: #FCFBF8; cursor: zoom-in;
  transform: rotate(var(--r)); box-shadow: 0 1px 2px rgba(31,30,28,.14), 0 24px 30px -22px rgba(31,30,28,.5); transition: transform .3s; }
.fb-photo.wide { width: min(440px, 100%); }
.fb-photo:hover { transform: rotate(0) translateY(-4px); }
.fb-photo img { display: block; width: 100%; height: auto; background: #E7E5DF; }

/* Lightbox: one photo at a time, arrows, keys and swipe */
dialog.lb { padding: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; background: rgba(18,17,16,.92); box-shadow: none; display: none; place-items: center; }
dialog.lb[open] { display: grid; }
dialog.lb::backdrop { background: transparent; }
.lb img { max-width: calc(100% - 32px); max-height: calc(100svh - 110px); width: auto; height: auto; box-shadow: 0 30px 60px -20px rgba(0,0,0,.6); }
.lb .close { color: #F7F6F3; top: calc(10px + env(safe-area-inset-top, 0px)); font-size: 28px; }
.lb .close:hover { color: #fff; }
.lb-nav { position: absolute; top: 50%; translate: 0 -50%; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(247,246,243,.14); color: #F7F6F3; cursor: pointer; display: grid; place-items: center; }
.lb-nav:hover { background: rgba(247,246,243,.28); }
.lb-nav:disabled { opacity: 0; pointer-events: none; }
.lb-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lb-nav.prev { left: 16px; } .lb-nav.next { right: 16px; }
.lb-cap { position: absolute; left: 0; right: 0; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); margin: 0; text-align: center; color: #C9C6BE; font-size: 13px; }

@media (max-width: 600px) {
  .fb-wrap { padding-inline: 16px; }
  .fb-grid { gap: 22px; }
  .lb-nav { display: none; }
}
