/* Desktop keeps the existing grid; phones use one real overflowing sheet track. */
.mobile-sheet-track{display:contents}
.mobile-sheet-spacer{display:none}
@media(max-width:760px){
 :root{--sheet-peek-height:calc(44px + env(safe-area-inset-bottom));--sheet-track-top:calc(140px + env(safe-area-inset-top))}
 .mobile-sheet-track{
  display:block;position:fixed;inset:var(--sheet-track-top) 0 0;z-index:8;
  overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:contain;overflow-anchor:none;
  -webkit-overflow-scrolling:touch;scrollbar-width:none;pointer-events:none;
 }
 .mobile-sheet-track::-webkit-scrollbar{display:none;width:0;height:0}
 body:not(.is-detail) .mobile-sheet-track{display:none}
 .has-destination .mobile-sheet-track{visibility:hidden;pointer-events:none}
 .mobile-sheet-preview-offset{height:min(100%,max(0px,calc(var(--mobile-sheet-height) - var(--sheet-peek-height))));pointer-events:none}
 .mobile-sheet-spacer{display:block;height:max(0px,calc(100dvh - var(--sheet-track-top) - var(--sheet-peek-height)));pointer-events:none}
 :root #workspace.detail-mode #panel{
  position:relative;inset:auto;width:100%;height:auto;
  min-height:calc(100dvh - var(--sheet-track-top));max-height:none;
  overflow:visible;pointer-events:auto;transform:none;transition:opacity .25s;
 }
 :root #panel-content{height:auto;min-height:0;overflow:visible}
 :root #panel .property-scroll-content{flex:none;min-height:0;overflow:visible;overscroll-behavior:auto}
 :root #panel .detail-topbar{position:relative;top:auto}
 :root .mobile-sheet-track #panel .gallery-main{height:clamp(160px,26dvh,240px)}
 .has-destination #workspace.detail-mode #panel{pointer-events:none}
}
