/* One document scroll owner: body overflow:auto used to break Safari sticky bars. */
html.home-document, html.gallery-document { height:auto; overflow-x:clip; overflow-y:auto; }
body.home-page, body.gallery-page { width:100%; height:auto; overflow:visible; }
.gallery-shell { width:100%; align-items:start; }
.gallery-rail { align-self:start; top:0; height:100dvh; }
.gallery-content { overflow:visible; }
.gallery-page .gallery-header {
  position:sticky;
  top:var(--navigation-offset, 0px);
  z-index:30;
  overflow:visible;
  transition:none;
}
.gallery-page .gallery-filters {
  position:static;
  min-width:0;
  width:100%;
  margin:0;
  padding:.3rem 0;
  overflow-x:auto;
  overscroll-behavior-x:contain;
  -webkit-overflow-scrolling:touch;
}
.gallery-page .gallery-title-row:has(.gallery-count[hidden]) { display:none; }
.gallery-page .layout-editor { top:var(--navigation-offset, 0px); }
.floating-site-nav { padding-left:max(1rem, env(safe-area-inset-left)); padding-right:max(1rem, env(safe-area-inset-right)); }
.floating-site-nav__link { min-height:44px; white-space:nowrap; }
.is-resume-locked .floating-site-nav, .is-project-locked .floating-site-nav { visibility:hidden; pointer-events:none; }
body.is-project-locked, body.is-resume-locked { overflow:hidden; }
.project-viewer, .resume-drawer { max-height:100dvh; }
.viewer-scroll, .resume-drawer__scroll { height:100%; overflow-y:auto; -webkit-overflow-scrolling:touch; }
@media (max-width:900px) {
  .gallery-rail { position:relative; height:auto; }
  .gallery-page .gallery-header { top:var(--navigation-offset, 0px); }
}
@media (pointer:coarse) {
  .gallery-rail { position:sticky; }
  .project-viewer .viewer-back { display:none!important; }
  .gallery-filters button { min-height:44px; }
}
@media (max-width:900px) and (pointer:coarse) {
  .gallery-rail { position:relative; }
}
@media (max-width:500px) {
  .floating-site-nav__links { gap:.5rem; }
  .resume-viewer .resume-drawer__header { flex-wrap:wrap; }
  .resume-drawer__actions { width:100%; }
}
