/* Dual-mode fork of gallery_mobile.css — scoped under #gallery-mode. Used by index.php. */
/* Responsive adjustments for small screens (<= 800px width) or portrait orientation */

#gallery-mode .gallery-grid {
    width: 100%;
    max-width: 100%;
    grid-template-columns: repeat(5, 1fr);      /* collapse to 5 equal columns */
  }

  /* Override any previous column mapping – let JS set column */
  
#gallery-mode .gallery-grid .cell {
    grid-column: auto !important;
  }

  /* Allow content to spill outside container during resize (handled by body overflow) */
  
#gallery-mode .gallery-container {
    overflow: visible;
  }

  /* Further scale down thumbnails on very narrow screens (e.g., old small phones) */
  
@media (max-width: 400px) {
    
#gallery-mode .thumb {
      width: 60px;
      height: 60px;
    }

  
}

  