/* =====================================================================
   The rental gallery: the Rental Listings page (rentex/rental-gallery)
   and each listing's own page (rentex/rental-detail).

   Drawn from the Rental Gallery design's first variant, Neutral Modern
   (_source-gallery/variations/), which the owner picked on 2026-10-10:
   a sticky toolbar with the search, the count and the order; a filter
   column beside a grid of cards with the rent badged on the photograph;
   and a listing page of photographs, key facts and description beside
   a sticky panel. Hand-written rather than generated, because the
   gallery's own tokens (Inter, cobalt, white) are rebound here to
   Rentex's: the paper and ink of the one light band, the bloom purple
   for actions, the stem green for availability, the serif for a unit's
   address and the mono for labels, as the home page's cards set them.

   The Rental Listings page opens with the header field
   (components/field.css); a listing's page has none, and sits under the
   masthead held folded. Both carry .c-gallery on their root, which
   every selector below begins with. The page's own data:
   inc/listings.php.
   ===================================================================== */

.c-gallery {
  --g-bg: var(--paper);
  --g-surface: #FFFFFF;
  --g-fg: var(--ink);
  --g-muted: #5C5568;
  --g-border: var(--line-light);
  --g-accent: var(--purple);
  --g-accent-hover: var(--purple-deep);
  --g-accent-soft: rgba(90, 44, 143, .10);
  --g-ok: var(--green);
  --g-ok-soft: rgba(46, 106, 69, .12);
  --g-soon: var(--purple-lift);
  --g-radius-sm: 8px;
  --g-radius-md: 12px;
  --g-radius-lg: 14px;
  --g-raised: 0 2px 8px rgba(25, 19, 34, .08);
  --focus: var(--green);
}

/* The header field on these pages carries a title rather than the
   home page's marquee line, and an address can be long. */
.c-gallery .hero .hero-panel h1 { font-size: clamp(34px, 4.4vw, 64px); }
.c-gallery .hero-lede a { color: var(--green-on-field); }

.c-gallery .g-body {
  background: var(--g-bg);
  color: var(--g-fg);
  padding: 0 var(--gutter) clamp(56px, 8vw, 100px);
}
.c-gallery .g-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---- buttons ---- */
.c-gallery .g-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 16px; border-radius: var(--g-radius-sm);
  border: 1px solid transparent; font-size: 15px; font-weight: 600;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform 60ms;
}
.c-gallery .g-btn:active { transform: translateY(1px); }
.c-gallery .g-btn-primary { background: var(--g-accent); color: #fff; border-color: var(--g-accent); }
.c-gallery .g-btn-primary:hover { background: var(--g-accent-hover); border-color: var(--g-accent-hover); }
.c-gallery .g-btn-green { background: var(--green); color: #fff; border-color: var(--green); }
.c-gallery .g-btn-green:hover { background: var(--green-deep); border-color: var(--green-deep); }
.c-gallery .g-btn-secondary { background: var(--g-surface); color: var(--g-fg); border-color: var(--g-border); }
.c-gallery .g-btn-secondary:hover { border-color: var(--g-fg); }
.c-gallery .g-btn-block { width: 100%; }

/* ---- toolbar ---- */
.c-gallery .g-toolbar {
  position: sticky; top: var(--g-stick, 72px); z-index: 15;
  margin: 0 calc(var(--gutter) * -1);
  padding: 12px var(--gutter);
  background: rgba(250, 249, 252, .92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--g-border);
}
.c-gallery .g-toolbar-inner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.c-gallery .g-search { position: relative; flex: 1 1 320px; min-width: 220px; }
.c-gallery .g-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--g-muted); pointer-events: none; }
.c-gallery .g-search input {
  width: 100%; min-height: 44px; padding: 10px 12px 10px 38px; border: 1px solid var(--g-border);
  border-radius: var(--g-radius-sm); background: var(--g-surface); color: var(--g-fg); font-size: 15px;
}
.c-gallery .g-count { color: var(--g-muted); font-size: 14px; white-space: nowrap; }
.c-gallery .g-count strong { color: var(--g-fg); font-weight: 600; }
.c-gallery .g-sort-wrap { display: flex; align-items: center; gap: 8px; }
.c-gallery .g-sort-wrap label { color: var(--g-muted); font-size: 14px; }
.c-gallery .g-sort {
  min-height: 44px; padding: 9px 12px; border: 1px solid var(--g-border); border-radius: var(--g-radius-sm);
  background: var(--g-surface); color: var(--g-fg); font-size: 14px;
}
.c-gallery .g-filters-toggle { display: none; }

/* ---- layout ---- */
.c-gallery .g-listings { padding-top: 32px; }
.c-gallery .g-grid-wrap { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 32px; align-items: start; }

/* ---- filter column ---- */
.c-gallery .g-facets { position: sticky; top: calc(var(--g-stick, 72px) + 84px); display: flex; flex-direction: column; gap: 24px; }
.c-gallery .g-facet-head { display: flex; align-items: center; justify-content: space-between; }
.c-gallery .g-facet-head h2 { font-size: 16px; font-weight: 600; }
.c-gallery .g-facet-clear { background: none; border: 0; color: var(--g-accent); font-size: 14px; padding: 0; min-height: 44px; }
.c-gallery .g-facet-clear:hover { text-decoration: underline; }
.c-gallery .g-facet-clear:disabled { color: var(--g-muted); opacity: .5; cursor: default; text-decoration: none; }
.c-gallery .g-facet-close { display: none; }
.c-gallery .g-facet-group { border-top: 1px solid var(--g-border); padding-top: 16px; }
.c-gallery .g-facet-group > h3 {
  font-family: var(--font-mono); font-size: 11px; font-weight: 400; letter-spacing: .14em;
  text-transform: uppercase; color: var(--green); margin-bottom: 12px;
}
.c-gallery .g-check { position: relative; display: flex; align-items: center; gap: 10px; min-height: 32px; font-size: 14px; cursor: pointer; user-select: none; }
.c-gallery .g-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.c-gallery .g-check .box { width: 17px; height: 17px; border: 1px solid #B9B0C7; border-radius: 5px; background: var(--g-surface); display: grid; place-items: center; flex: 0 0 auto; }
.c-gallery .g-check .box svg { width: 12px; height: 12px; color: #fff; opacity: 0; }
.c-gallery .g-check input:checked + .box { background: var(--g-accent); border-color: var(--g-accent); }
.c-gallery .g-check input:checked + .box svg { opacity: 1; }
.c-gallery .g-check input:focus-visible + .box { outline: 2px solid var(--focus); outline-offset: 2px; }
.c-gallery .g-check .label { flex: 1; }
.c-gallery .g-check .cnt { color: var(--g-muted); font-family: var(--font-mono); font-size: 12px; }
.c-gallery .g-check:hover .box { border-color: var(--g-accent); }

.c-gallery .g-seg { display: flex; gap: 6px; flex-wrap: wrap; }
.c-gallery .g-seg button {
  min-height: 36px; padding: 7px 12px; border: 1px solid var(--g-border); background: var(--g-surface);
  border-radius: 999px; font-size: 14px; color: var(--g-fg);
}
.c-gallery .g-seg button:hover { border-color: var(--g-accent); }
.c-gallery .g-seg button[aria-pressed="true"] { background: var(--g-accent); border-color: var(--g-accent); color: #fff; }

.c-gallery .g-range-val { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; }
.c-gallery .g-range-val strong { font-family: var(--font-mono); }
.c-gallery input[type="range"] { width: 100%; accent-color: var(--g-accent); }

/* ---- active filters ---- */
.c-gallery .g-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.c-gallery .g-chips:empty { display: none; }
.c-gallery .g-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px 5px 12px; background: var(--g-accent-soft); color: var(--g-accent); border-radius: 999px; font-size: 14px; }
.c-gallery .g-chip button { background: none; border: 0; color: inherit; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; }
.c-gallery .g-chip button:hover { background: rgba(90, 44, 143, .18); }
.c-gallery .g-chip button svg { width: 13px; height: 13px; }

/* ---- cards ---- */
.c-gallery .g-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(288px, 1fr)); gap: 24px; }
.c-gallery .lcard {
  background: var(--g-surface); border: 1px solid var(--g-border); border-radius: var(--g-radius-lg);
  overflow: hidden; display: flex; flex-direction: column; color: var(--g-fg);
  transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease;
}
.c-gallery .lcard:hover { box-shadow: var(--g-raised); border-color: rgba(90, 44, 143, .45); transform: translateY(-2px); }
.c-gallery .lcard[hidden] { display: none; }
.c-gallery .card-media {
  position: relative; aspect-ratio: 16 / 11; overflow: hidden;
  background: linear-gradient(135deg, rgba(90, 44, 143, .14), rgba(46, 106, 69, .10)), #EEEAF3;
  border-bottom: 1px solid var(--g-border);
}
.c-gallery .card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.c-gallery .card-media .card-ph {
  position: absolute; left: 14px; top: 14px; font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--g-muted);
}
.c-gallery .price-badge {
  position: absolute; top: 12px; right: 12px; background: var(--g-surface);
  border: 1px solid var(--g-border); border-radius: 999px;
  padding: 5px 11px; font-size: 14px; font-weight: 600; font-family: var(--font-mono); box-shadow: var(--g-raised);
}
.c-gallery .price-badge span { color: var(--g-muted); font-weight: 400; }
.c-gallery .status {
  position: absolute; bottom: 12px; left: 12px; display: inline-flex; align-items: center; gap: 6px;
  background: var(--g-surface); border: 1px solid var(--g-border); border-radius: 999px;
  padding: 4px 10px; font-size: 12px; font-weight: 500;
}
.c-gallery .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--g-ok); }
.c-gallery .soon .dot { background: var(--g-soon); }
.c-gallery .card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.c-gallery .card-town { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--green); }
.c-gallery .card-title { font-family: var(--font-serif); font-size: 21px; font-weight: 600; line-height: 1.25; letter-spacing: -.015em; }
.c-gallery .card-addr { color: var(--g-muted); font-size: 14px; }
.c-gallery .facts { display: flex; gap: 16px; flex-wrap: wrap; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--g-border); font-size: 14px; }
.c-gallery .facts span { display: inline-flex; align-items: center; gap: 6px; }
.c-gallery .facts svg { width: 15px; height: 15px; color: var(--g-muted); }
.c-gallery .facts b { font-weight: 600; }

.c-gallery .g-empty { grid-column: 1 / -1; text-align: center; padding: 80px 16px; color: var(--g-muted); }
.c-gallery .g-empty[hidden] { display: none; }
.c-gallery .g-empty svg { width: 40px; height: 40px; margin: 0 auto 16px; color: #B9B0C7; }
.c-gallery .g-empty h3 { color: var(--g-fg); font-size: 24px; margin-bottom: 8px; }
.c-gallery .g-empty a { color: var(--g-accent); }
.c-gallery .g-more { margin-top: 32px; font-size: 14px; color: var(--g-muted); }
.c-gallery .g-more a { color: var(--g-accent); text-decoration: underline; }
.c-gallery .g-scrim { display: none; position: fixed; inset: 0; background: rgba(25, 19, 34, .45); z-index: 40; }

/* ---- a listing's page ---- */
.c-gallery .backlink { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; color: var(--g-muted); font-size: 14px; font-weight: 500; margin-top: 24px; }
.c-gallery .backlink:hover { color: var(--g-accent); }
.c-gallery .backlink svg { width: 15px; height: 15px; }
/* The masthead stays folded on a listing's page (patterns/site-header.php) and there is no header
   field, so the page reserves the folded bar's height, which view.js measures. */
.c-gallery .d-body {
  padding-top: calc(var(--bar-folded-h, 96px) + 8px);
  /* the paper runs the full width; the content holds to 1280px inside it */
  padding-inline: max(var(--gutter), calc((100% - 1280px) / 2));
}
.c-gallery .d-lead { display: flex; flex-direction: column; }
.c-gallery .d-head { margin-top: 12px; }
.c-gallery .d-title { min-width: 0; display: flex; flex-direction: column; gap: 6px; }

/* the first five photographs: the first at half the width and both rows tall, the others beside it;
   a listing with fewer gives each its share (the modifier counts them) */
.c-gallery .d-mosaic {
  display: grid; grid-template-rows: repeat(2, minmax(0, 1fr)); grid-auto-flow: column; gap: 8px;
  margin-top: 20px; aspect-ratio: 12 / 5; max-width: 100%; border-radius: var(--g-radius-lg); overflow: hidden;
}
.c-gallery .d-mosaic--1 { grid-template-columns: minmax(0, 1fr); }
.c-gallery .d-mosaic--2, .c-gallery .d-mosaic--3 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.c-gallery .d-mosaic--4, .c-gallery .d-mosaic--5 { grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); }
.c-gallery .d-mosaic > :first-child,
.c-gallery .d-mosaic--2 > :last-child,
.c-gallery .d-mosaic--4 > :last-child { grid-row: span 2; }
.c-gallery .d-shot { position: relative; min-height: 0; padding: 0; border: 0; overflow: hidden; background: #EEEAF3; cursor: zoom-in; }
.c-gallery .d-shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.c-gallery .d-shot:hover img { transform: scale(1.03); }
.c-gallery .d-count {
  position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px;
  border-radius: 999px; background: rgba(255, 255, 255, .94); color: var(--g-fg); font-size: 13px; font-weight: 600;
  box-shadow: 0 2px 8px rgba(25, 19, 34, .18);
}
.c-gallery .d-count svg { width: 15px; height: 15px; }

/* what shows only on a phone, or only wider; the phone side is undone under 640px below */
.c-gallery .d-tile.is-phone, .c-gallery .d-count.is-phone, .c-gallery .d-more.is-phone { display: none; }
.c-gallery .d-kicker { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--g-ok); }
.c-gallery .d-title h1 { font-family: var(--font-serif); font-size: clamp(28px, 3vw, 38px); font-weight: 600; line-height: 1.15; letter-spacing: -.015em; text-wrap: balance; }
.c-gallery .d-address { color: var(--g-muted); }

/* the one bar of what a renter decides on: the rent, the facts and the ways forward */
.c-gallery .d-glance {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; margin-top: 24px; padding: 20px 24px;
  background: var(--g-surface); border: 1px solid var(--g-border); border-radius: var(--g-radius-lg); box-shadow: var(--g-raised);
}
.c-gallery .price-row { display: flex; align-items: baseline; gap: 8px; }
.c-gallery .price-row .amt { font-size: 30px; font-weight: 700; font-family: var(--font-mono); letter-spacing: -.02em; }
.c-gallery .price-row .per { color: var(--g-muted); font-size: 14px; }
.c-gallery .d-facts { flex: 1 1 360px; display: flex; flex-wrap: wrap; gap: 12px 28px; margin: 0; }
.c-gallery .d-fact dd { margin: 0; }
.c-gallery .d-fact dt { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--g-muted); }
.c-gallery .d-fact dd { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.c-gallery .d-fact.is-now dd { color: var(--green-deep); }
.c-gallery .d-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.c-gallery .d-actions .g-btn { min-height: 48px; padding: 0 22px; }
.c-gallery .d-note { font-size: 14px; color: var(--g-muted); }
.c-gallery .d-note a { color: var(--g-accent); }

/* the description beside the photographs */
.c-gallery .d-cols { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; align-items: start; padding-top: 32px; }
.c-gallery .d-cols--single { grid-template-columns: minmax(0, 1fr); }
/* five photographs or fewer: the mosaic holds them all, so only a phone has a grid */
.c-gallery .d-cols--phone-photos { grid-template-columns: minmax(0, 1fr); }
.c-gallery .d-cols--phone-photos .d-photos { display: none; }
.c-gallery .d-main { display: flex; flex-direction: column; gap: 28px; }
.c-gallery .d-photos { display: flex; flex-direction: column; gap: 12px; }
.c-gallery .d-photos-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.c-gallery .d-photos-head h2 { font-family: var(--font-serif); font-size: 26px; font-weight: 600; letter-spacing: -.015em; }
.c-gallery .d-all { min-height: 44px; padding: 0; border: 0; background: none; color: var(--g-accent); font-size: 14px; font-weight: 600; cursor: pointer; }
.c-gallery .d-all:hover { text-decoration: underline; }
.c-gallery .d-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.c-gallery .d-tile { position: relative; aspect-ratio: 4 / 3; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: #EEEAF3; cursor: zoom-in; }
.c-gallery .d-tile.is-big-desk { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
/* a grid with one tile over a whole number of rows gives its first tile the whole row, and with two
   over spans its last tile across two columns (with only two tiles, its first beside the second),
   the photograph laid over that tile so the row keeps its neighbour's height; no tile stands two
   rows tall, and no count leaves a cell empty; render.php marks the tiles for each width, and a
   phone's rules are below. rx_holes() in _dev/checks/lib/rentex-listing-page.php copies these
   spans by hand: change both together */
.c-gallery .d-tile.is-full-desk { grid-column: 1 / -1; aspect-ratio: 3 / 2; }
.c-gallery .d-tile.is-wide-desk { grid-column: span 2; aspect-ratio: auto; }
.c-gallery .d-tile.is-wide-desk img, .c-gallery .d-tile.is-wide-phone img { position: absolute; inset: 0; }
.c-gallery .d-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.c-gallery .d-tile:hover img { transform: scale(1.03); }
.c-gallery .d-more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(26, 10, 52, .72); color: #fff; font-weight: 600; font-size: 16px; }
.c-gallery .similar { padding-top: 48px; }

/* the photograph viewer */
.c-gallery .d-viewer { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; }
.c-gallery .d-viewer::backdrop { background: rgba(14, 6, 28, .92); }
.c-gallery .d-viewer[open] { display: grid; place-items: center; }
.c-gallery .d-viewer img { max-width: calc(100vw - 160px); max-height: calc(100vh - 120px); width: auto; height: auto; border-radius: 6px; }
.c-gallery .d-viewer-close, .c-gallery .d-viewer-step {
  position: fixed; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .92); color: var(--ink); font-size: 28px; line-height: 1; cursor: pointer;
}
.c-gallery .d-viewer-close { top: 20px; right: 20px; }
.c-gallery .d-viewer-step { top: 50%; transform: translateY(-50%); }
.c-gallery .d-viewer-step svg { width: 22px; height: 22px; }
.c-gallery .d-viewer-prev { left: 20px; }
.c-gallery .d-viewer-next { right: 20px; }
.c-gallery .d-viewer-count { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, .92); color: var(--ink); font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; }
.c-gallery .prose h2 { font-family: var(--font-serif); font-size: 26px; font-weight: 600; letter-spacing: -.015em; margin-bottom: 12px; }
.c-gallery .prose p { color: #3D3547; font-size: 16px; line-height: 1.65; max-width: 66ch; }
.c-gallery .prose p + p { margin-top: 12px; }
.c-gallery .prose a { color: var(--g-accent); text-decoration: underline; }
.c-gallery .included ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.c-gallery .included li { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; }
.c-gallery .included .ic { width: 20px; height: 20px; border-radius: 50%; background: var(--g-ok-soft); color: var(--g-ok); display: grid; place-items: center; flex: 0 0 auto; margin-top: 1px; }
.c-gallery .included .ic svg { width: 12px; height: 12px; }
.c-gallery .similar h2 { font-family: var(--font-serif); font-size: 26px; font-weight: 600; margin-bottom: 20px; }

/* ---- narrower screens ---- */
@media (max-width: 1000px) {
  .c-gallery .g-grid-wrap { grid-template-columns: minmax(0, 1fr); }
  .c-gallery .g-facets {
    position: fixed; top: 0; left: 0; bottom: 0; width: min(320px, 86vw); z-index: 45;
    background: var(--g-surface); border-right: 1px solid var(--g-border);
    padding: 24px; overflow-y: auto; transform: translateX(-100%);
    transition: transform .2s ease; gap: 20px;
  }
  .c-gallery[data-filters="open"] .g-facets { transform: none; }
  .c-gallery[data-filters="open"] .g-scrim { display: block; }
  .c-gallery .g-filters-toggle { display: inline-flex; }
  .c-gallery .g-facet-close { display: inline-flex; }
  .c-gallery .d-cols { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  /* the photographs come before the description once they stack */
  .c-gallery .d-photos { order: -1; }
}
@media (max-width: 820px) {
  .c-gallery .g-toolbar { --g-stick: 64px; }
  .c-gallery .d-body { padding-top: calc(var(--bar-folded-h, 64px) + 8px); }
  .c-gallery .d-viewer img { max-width: 100vw; max-height: calc(100vh - 140px); border-radius: 0; }
  .c-gallery .d-viewer-step { top: auto; bottom: 16px; transform: none; }
  .c-gallery .d-viewer-count { bottom: 28px; }
}
@media (max-width: 640px) {
  .c-gallery .g-cards { grid-template-columns: minmax(0, 1fr); }
  /* the first photograph alone, above the title, the full width of the screen */
  .c-gallery .d-mosaic {
    order: -1; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr);
    margin: 8px calc(-1 * var(--gutter)) 0; max-width: none; aspect-ratio: 4 / 3; border-radius: 0;
  }
  .c-gallery .d-mosaic > :first-child { grid-row: auto; }
  .c-gallery .d-mosaic > :not(:first-child) { display: none; }
  .c-gallery .d-head { margin-top: 18px; }
  .c-gallery .d-tile.is-desk, .c-gallery .d-count.is-desk, .c-gallery .d-more.is-desk { display: none; }
  .c-gallery .d-tile.is-phone { display: block; }
  .c-gallery .d-count.is-phone { display: inline-flex; }
  .c-gallery .d-more.is-phone { display: grid; }
  .c-gallery .d-tile.is-big-desk,
  .c-gallery .d-tile.is-full-desk,
  .c-gallery .d-tile.is-wide-desk { grid-column: auto; grid-row: auto; aspect-ratio: 4 / 3; }
  .c-gallery .d-tile.is-big-phone { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
  .c-gallery .d-tile.is-full-phone { grid-column: 1 / -1; aspect-ratio: 3 / 2; }
  .c-gallery .d-tile.is-wide-phone { grid-column: span 2; aspect-ratio: auto; }
  .c-gallery .d-cols--phone-photos .d-photos { display: flex; }
  .c-gallery .d-glance { padding: 16px; }
  .c-gallery .d-actions, .c-gallery .d-actions .g-btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .c-gallery .lcard, .c-gallery .g-facets, .c-gallery .d-tile img, .c-gallery .d-shot img { transition: none; }
  .c-gallery .lcard:hover, .c-gallery .d-tile:hover img, .c-gallery .d-shot:hover img { transform: none; }
}
