/* v1.8.0 — compact Art & Photography page. Content determines height; never stretch gallery cards. */
body:not(.home) main.ah-curated-gallery.ah-paper {
  min-height: 0;
  padding: 1.4rem 1.25rem 2.25rem;
}
.ah-curated-gallery .ah-gallery-layout{width:min(100%,1120px);margin:0 auto;max-width:1120px}
.ah-curated-gallery [hidden]{display:none!important}
.ah-curated-gallery .ah-kicker{margin:0 0 .35rem}
.ah-curated-gallery .ah-gallery-layout>h1{margin:.15rem 0 .35rem;font-size:clamp(2.25rem,5vw,4.15rem);line-height:1.15}
.ah-curated-gallery .ah-intro{margin:0 0 .8rem;max-width:740px}
.ah-curated-gallery .ah-gallery-filter{display:flex;flex-wrap:wrap;gap:.45rem;margin:.6rem 0 .55rem}
.ah-curated-gallery .ah-gallery-filter button{font:600 .72rem/1.35 'Lato',sans-serif;text-transform:uppercase;letter-spacing:.09em;padding:.6rem .95rem;background:transparent;color:#332a29;border:1px solid #aa9990;cursor:pointer}
.ah-curated-gallery .ah-gallery-filter button[aria-pressed="true"],.ah-curated-gallery .ah-gallery-filter button:hover{background:#39262d;color:#f7ecdf;border-color:#39262d}
.ah-gallery-filter button:focus-visible,.ah-gallery-collection-picker select:focus-visible{outline:2px solid #80555c;outline-offset:3px}
.ah-curated-gallery .ah-gallery-collection-picker{display:flex;align-items:center;flex-wrap:wrap;gap:.55rem;margin:0 0 1rem}
.ah-gallery-collection-picker label{font:600 .7rem/1.45 'Lato',sans-serif;text-transform:uppercase;letter-spacing:.08em;white-space:nowrap}
.ah-gallery-collection-picker select{min-width:175px;max-width:330px;width:100%;padding:.5rem .75rem;border:1px solid #ad9b91;background:#faf5ef;color:#332a29;font:1rem 'Cormorant Garamond',Georgia,serif}
.ah-curated-gallery .ah-gallery-discipline{height:auto!important;min-height:0!important;margin:0;padding:0 0 1.25rem;scroll-margin-top:5rem;display:block;break-inside:auto}
.ah-curated-gallery .ah-gallery-discipline+.ah-gallery-discipline{border-top:1px solid #cdbfb5;padding-top:1rem}
.ah-curated-gallery .ah-gallery-discipline>h2{font:400 clamp(1.65rem,2.6vw,2.2rem)/1.2 'Playfair Display',Georgia,serif;margin:0 0 .65rem;padding:0}
/* Flex avoids stretched grid tracks and large gaps when there are few artworks. */
.ah-curated-gallery .ah-art-grid,
.ah-curated-gallery .ah-art-grid[data-visible-count="1"],
.ah-curated-gallery .ah-art-grid[data-visible-count="2"]{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-start;
  align-content:flex-start;
  justify-content:flex-start;
  gap:1.35rem;
  height:auto!important;
  min-height:0!important;
  max-width:none;
  margin:0;
  padding:0;
}
.ah-curated-gallery .ah-gallery-entry{
  flex:0 1 340px;
  width:min(100%,340px);
  min-width:0;
  height:auto!important;
  min-height:0!important;
  margin:0;
  padding:0;
  align-self:flex-start;
}
.ah-curated-gallery .ah-art-tile{display:block;height:auto!important;min-height:0!important;margin:0;padding:0}
.ah-curated-gallery .ah-art-tile a{display:block;height:auto;line-height:normal}
.ah-curated-gallery .ah-art-tile img{
  display:block;
  width:auto;
  max-width:100%;
  height:auto;
  max-height:460px;
  aspect-ratio:auto;
  object-fit:contain;
  object-position:left top;
  margin:0;
  background:transparent;
}
.ah-curated-gallery .ah-art-tile h3{font:400 1.35rem/1.3 'Cormorant Garamond',Georgia,serif;margin:.5rem 0 .15rem}
.ah-curated-gallery .ah-art-tile p{margin:0;color:#736760}
.ah-gallery-no-match{font-style:italic;opacity:.7;margin:.75rem 0 0}
.ah-curated-gallery .ah-gallery-discipline.ah-gallery-dark{background:#251c1e;color:#f0e5d8;padding:1rem;margin:0 0 .75rem;border-top:0}
.ah-gallery-dark .ah-art-tile a,.ah-gallery-dark .ah-art-tile h3{color:#f0e5d8}
.ah-gallery-dark .ah-art-tile p{color:#d5beb4}
@media(max-width:560px){
  body:not(.home) main.ah-curated-gallery.ah-paper{padding:1.25rem 1rem 1.75rem}
  .ah-curated-gallery .ah-gallery-filter button{flex:1 1 auto;padding:.6rem .65rem}
  .ah-curated-gallery .ah-gallery-collection-picker{display:block}
  .ah-gallery-collection-picker label{display:block;margin-bottom:.35rem}
  .ah-gallery-collection-picker select{max-width:100%}
  .ah-curated-gallery .ah-art-grid{gap:1rem}
  .ah-curated-gallery .ah-gallery-entry{flex-basis:100%;width:100%}
  .ah-curated-gallery .ah-gallery-discipline+.ah-gallery-discipline{padding-top:.85rem}
}
/* Chrome PDF/print: do not distribute sparse gallery rows across pages. */
@media print{
  body:not(.home) main.ah-curated-gallery.ah-paper{padding:.5rem 0!important}
  .ah-curated-gallery .ah-gallery-discipline,.ah-curated-gallery .ah-art-grid,.ah-curated-gallery .ah-gallery-entry{height:auto!important;min-height:0!important;align-content:flex-start!important}
  .ah-curated-gallery .ah-gallery-entry{break-inside:avoid;page-break-inside:avoid}
  .ah-curated-gallery .ah-art-tile img{max-height:360px}
}
