/* TRUE SHAPE: the one album photo grid (Daniel 2026-09-20: "they're presented
   in a square ... the images are either portrait or landscape. They're never
   square"; 2026-09-27: "we need it to be the way it is on the youth, that
   latest youth album", for every album and every view of an album).

   The grid lays its tiles in justified rows: each tile keeps its photograph's
   own ratio (--r = width / height, set by the page's script from the stored
   size, or from the loaded picture when the feed has no size), every tile in
   a row shares one height, and nothing is cropped. The ::after soaks up a
   short last row so it is not stretched; the width cap does the same for a
   lone tile before a day divider.

   ONE FILE, SERVED ON EVERY HOST THAT SHOWS AN ALBUM. This copy under
   public/youth is the source; public/church-v2/assets/css/true-shape.css and
   public/church-photos/true-shape.css are symlinks to it, so the youth album,
   the Church Archive, sulamitachurch.com/media/albums/, a family's own
   photos on /photos/ and the admin and station album views cannot drift
   apart. It was moved here out of albums.css on 2026-09-27. A grid opts in
   with .is-true-shape; /people/ and the face grids never do and keep their
   square tiles.

   Each tile selector names its grid, so it outranks the page's own square
   rule (.shot-tile.shot-skel, .alb-shot-wait) whatever order the sheets load. */
.shot-grid.is-true-shape,
.alb-shots.is-true-shape,
.photo-grid.is-true-shape,
.album-grid.is-true-shape,
.sa-grid.is-true-shape { display: flex; flex-wrap: wrap; --row-h: 150px; }
.shot-grid.is-true-shape::after,
.alb-shots.is-true-shape::after,
.photo-grid.is-true-shape::after,
.album-grid.is-true-shape::after,
.sa-grid.is-true-shape::after { content: ''; flex: 1000000 1 0; }
.shot-grid.is-true-shape > .shot-tile,
.alb-shots.is-true-shape > .alb-shot,
.photo-grid.is-true-shape > .photo-tile,
.album-grid.is-true-shape > .album-tile,
.sa-grid.is-true-shape > .sa-tile {
  --r: 1.5;
  flex: var(--r) 1 calc(var(--r) * var(--row-h));
  max-width: calc(var(--r) * var(--row-h) * 2.2);
  aspect-ratio: var(--r);
  width: auto;
}
/* A tile whose picture sits in an <img> sized by its own rule (the church
   site's .alb-shot img is a 1 / 1 square) fills the tile instead. The tile is
   already the photograph's shape, so cover crops nothing. */
.alb-shots.is-true-shape > .alb-shot img,
.photo-grid.is-true-shape > .photo-tile img,
.album-grid.is-true-shape > .album-tile img,
.sa-grid.is-true-shape > .sa-tile img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
}
/* The Church Archive's tiles are <button>s where the youth album's are links,
   and nothing reset the browser's own button border (2px outset) and padding
   (1px 6px): every archive photo sat in a grey frame with its edges cropped.
   A tile is the photograph and nothing else, as on the youth album. */
.shot-grid.is-true-shape > .shot-tile { padding: 0; border: 0; }
/* A divider inside the grid (a day, a sub-folder) takes a whole row. */
.shot-grid.is-true-shape > .day-rail,
.sa-grid.is-true-shape > .sa-grid-sub { flex: 0 0 100%; }
@media (min-width: 620px) {
  .shot-grid.is-true-shape,
  .alb-shots.is-true-shape,
  .photo-grid.is-true-shape,
  .album-grid.is-true-shape,
  .sa-grid.is-true-shape { --row-h: 170px; }
}
@media (min-width: 980px) {
  .shot-grid.is-true-shape,
  .alb-shots.is-true-shape,
  .photo-grid.is-true-shape,
  .album-grid.is-true-shape,
  .sa-grid.is-true-shape { --row-h: 210px; }
}
