/* ============================================================================
   101-php-02-editorial-media — pictures by their number (UNIVERSAL: only the site's tokens).
   --x101-media-cols and --x101-media-ratio come from the PHP (x101MediaColumns()).
   ========================================================================== */
.x101-media {
  display: grid; grid-template-columns: repeat(var(--x101-media-cols, 1), minmax(0, 1fr));
  gap: var(--x101-media-gap, 20px); margin: 0;
}
.x101-media img { width: 100%; height: auto; background: var(--soft, #f5f5f5); }
.x101-media--many img { aspect-ratio: var(--x101-media-ratio, 3 / 2); object-fit: cover; }
/* ONE picture: it spans its lane, at most --x101-media-max high (settings 'max_height') */
.x101-media:not(.x101-media--many) img { max-height: var(--x101-media-max, 468px); object-fit: cover; }
@media (max-width: 29.99em) {
  .x101-media { grid-template-columns: 1fr; }
}
/* a picture WITH a caption (settings 'caption'): the picture and its line under it are one cell of the row */
.x101-media__item { display: flex; flex-direction: column; min-width: 0; }
.x101-media__caption { margin-top: 6px; font-size: .875em; line-height: 1.4; color: var(--muted, #666); }
/* the editor-only note (more pictures in a row than the settings advise) */
.x101-note { margin: 0; padding: 8px 12px; font-size: 14px; background: #fff4d6; border-left: 3px solid #e0a800; color: #5a4300; }
