/* The gallery grid and full-screen view, shared by the homepage and more.html. */
/* Gallery: every painting at its own proportions, in columns. */

.gcols { columns: 2; column-gap: 18px; }
@media (min-width: 760px) { .gcols { columns: 3; column-gap: 28px; } }
.gitem { display: block; width: 100%; break-inside: avoid; margin: 0 0 18px; padding: 0; border: 0; background: none; cursor: zoom-in; color: inherit; font: inherit; text-align: left; }
@media (min-width: 760px) { .gitem { margin-bottom: 28px; } }
.gitem img { width: 100%; height: auto; background: var(--tile); transition: opacity .3s ease; }
.gitem:hover img { opacity: .86; }
.gitem .c { display: block; font-size: 14px; color: var(--muted); margin-top: 6px; }
.gview { position: fixed; inset: 0; background: var(--bg); z-index: 11; display: grid; grid-template-rows: auto 1fr auto; padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px); }
.gview[hidden] { display: none; }
.gview .bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 20px; }
.gview button { background: none; border: 0; padding: 12px 4px; cursor: pointer; color: var(--ink); }
.gview .stage { display: grid; place-items: center; padding: 0 20px; min-height: 0; }
.gview .stage img { max-width: 100%; max-height: calc(100vh - 140px); width: auto; height: auto; object-fit: contain; }
.gview .cap { text-align: center; color: var(--muted); padding: 10px 20px 18px; font-size: 15px; }
.gview .cap .t { color: var(--ink); font-size: 19px; }
.gview .cap p { margin: 6px auto 0; max-width: 56ch; color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .gitem img { transition: none; } }
