/* A category changes the photographs, never the size of their exhibition. */
body.motion-scope{height:100svh;overflow:hidden}
body.motion-scope #showroom-page{padding-top:0!important;height:100svh;min-height:0}
body.motion-scope .motion-world.is-scope{height:100svh;min-height:0;overflow:hidden;background:var(--mg-black-2)}
body.motion-scope .motion-world.is-scope .motion-viewport{position:absolute;inset:0;width:100%;height:100%;min-height:0;padding:0;overflow-y:auto;overflow-x:hidden;border:0;touch-action:pan-y pinch-zoom}
body.motion-scope .motion-world.is-scope::after{content:'';position:absolute;inset:0;z-index:2;pointer-events:none;background:linear-gradient(0deg,color-mix(in srgb,var(--mg-black-2) 57%,transparent),transparent 220px)}
body.motion-scope .motion-world.is-scope .node-gallery{margin:0;padding:calc(var(--showroom-top-clearance,86px) + 16px) clamp(24px,3.5vw,56px) 180px}
body.motion-scope .motion-world.is-scope .gallery{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:var(--mg-space-16);width:100%;margin-left:0;min-height:100svh;align-items:start}
body.motion-scope .motion-world.is-scope .photo-column{display:flex;flex-direction:column;gap:var(--mg-space-16);padding:0;margin:0}
body.motion-scope .motion-world.is-scope .photo-column:nth-child(5n+1){margin-top:0}
body.motion-scope .motion-world.is-scope .photo-column:nth-child(5n+2){margin-top:0}
body.motion-scope .motion-world.is-scope .photo-column:nth-child(5n+3){margin-top:0}
body.motion-scope .motion-world.is-scope .photo-column:nth-child(5n+4){margin-top:0}
body.motion-scope .motion-world.is-scope .photo-column:nth-child(5n){margin-top:0}
body.motion-scope .motion-world.is-scope .gallery-head{display:none}
body.motion-scope .motion-world.is-scope .saved-empty{margin:22svh var(--mg-space-24) 0;background:color-mix(in srgb,var(--mg-black-2) 85%,transparent);backdrop-filter:blur(10px);border-color:color-mix(in srgb,var(--mg-white) 15%,transparent)}

@media(max-width:740px){
 body.motion-scope .motion-world.is-scope .node-gallery:not(.is-curated-gallery){padding:calc(var(--showroom-top-clearance,56px) + 16px) 16px 180px}
 body.motion-scope .motion-world.is-scope .photo-column:nth-child(n){margin-top:0}
 body.motion-scope .motion-world.is-scope .gallery{grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--mg-space-12);width:100%;margin:0}
 body.motion-scope .motion-world.is-scope .photo-column{gap:var(--mg-space-12);padding:0!important;margin:0}
}

/* A small complete selection is an exhibition, with every photograph intact. */
body.motion-scope .motion-world.is-scope .node-gallery.is-curated-gallery{
 --curated-top:calc(100px + env(safe-area-inset-top));
 --curated-bottom:calc(164px + env(safe-area-inset-bottom));
 --curated-photo-height:max(140px,calc(100svh - var(--curated-top) - var(--curated-bottom) - 36px - var(--photo-utility-height,0px)));
 padding:var(--curated-top) clamp(24px,4vw,56px) var(--curated-bottom);
}
body.motion-scope .motion-world.is-scope .gallery.is-curated{
 grid-template-columns:repeat(var(--curated-columns),minmax(0,1fr));
 gap:var(--mg-space-24) var(--mg-space-20);width:100%;max-width:var(--curated-max-width);margin:0 auto;min-height:0;align-items:start;
}
body.motion-scope .motion-world.is-scope .gallery.is-curated .photo-column{display:contents;margin:0!important;padding:0!important}
body.motion-scope .motion-world.is-scope .gallery.is-curated .photo-card{
 order:var(--curated-order);width:100%;max-width:calc(var(--curated-photo-height) * var(--photo-ratio,100));justify-self:center;
}
body.motion-scope .motion-world.is-scope .gallery.is-curated[data-photo-count="1"],
body.motion-scope .motion-world.is-scope .gallery.is-curated[data-photo-count="2"]{min-height:var(--curated-photo-height);align-items:center}
body.motion-scope .motion-world.is-scope .is-curated-gallery>.feed-status{margin:var(--mg-space-20) 0 0}
body.motion-scope .motion-world.is-scope:has(.is-curated-gallery)::after{background:linear-gradient(0deg,color-mix(in srgb,var(--mg-black-2) 40%,transparent),transparent 160px)}
@media(max-width:740px){
 body.motion-scope .motion-world.is-scope .node-gallery.is-curated-gallery{
  --curated-top:calc(92px + env(safe-area-inset-top));--curated-bottom:calc(188px + env(safe-area-inset-bottom));
  padding-left:var(--mg-space-16);padding-right:var(--mg-space-16);
 }
 body.motion-scope .motion-world.is-scope .gallery.is-curated{grid-template-columns:repeat(var(--curated-mobile-columns),minmax(0,1fr));gap:var(--mg-space-12)}
 body.motion-scope .motion-world.is-scope .gallery.is-curated[data-photo-count="2"]{min-height:0;align-items:start}
}
/* Each column continues below its own photograph rather than a shared row. */
body.motion-scope .motion-world.is-scope .gallery.is-curated.is-masonry{
 grid-auto-rows:1px;row-gap:0;min-height:0;align-items:start;
}
body.motion-scope .motion-world.is-scope .gallery.is-curated.is-masonry .photo-card{
 grid-row-end:span var(--curated-span,1);max-width:none;align-self:start;
}
/* Phones turned sideways keep the portrait photo columns (owner decision 2026-11-02). */
@media(orientation:landscape) and (max-height:500px) and (min-width:741px){
 body.motion-scope .motion-world.is-scope .gallery{grid-template-columns:repeat(3,minmax(0,1fr))}
 body.motion-scope .motion-world.is-scope .gallery.is-curated{grid-template-columns:repeat(var(--curated-mobile-columns),minmax(0,1fr));gap:var(--mg-space-12)}
}
