/* Photos & videos (fundaclub.org/photos/). Builds on site.css tokens. */
.gallery { display: grid; gap: 22px; padding-bottom: 64px; }
.gallery .card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.gallery h2 { font-size: var(--step-2); font-weight: 750; }
.g-hero { padding-top: 28px; display: grid; gap: 10px; }
.g-hero h1 { font-size: var(--step-4); font-weight: 800; }
.g-hero p { color: var(--muted); max-width: 64ch; }
.g-bar { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; padding-top: 18px; }
.g-bar > span { margin-right: auto; }
.g-signin { max-width: 460px; }

/* list of galleries */
.g-tiles { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.g-tile { display: grid; text-align: left; font: inherit; color: inherit; border: 0; padding: 0; cursor: pointer; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.g-tile:hover .g-cover img { transform: scale(1.03); }
.g-cover { display: block; aspect-ratio: 16 / 10; background: color-mix(in srgb, var(--navy) 8%, var(--card)); overflow: hidden; }
.g-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.g-nocover { display: grid; place-items: center; height: 100%; font-size: 2.4rem; color: var(--muted); }
.g-tile-body { display: grid; gap: 4px; padding: 14px 16px 16px; }
.g-tile-body strong { font-family: var(--font-display); font-size: var(--step-1); }

/* upload */
.g-upload { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.g-upload.over { box-shadow: 0 0 0 3px var(--navy), var(--shadow); }
.g-upload .btn { cursor: pointer; }
.g-queue { grid-column: 1 / -1; list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.g-queue:empty { display: none; }
.g-queue li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; font-size: var(--step--1); border-top: 1px solid var(--line); padding-top: 8px; }
.g-qname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.g-queue progress { grid-column: 1 / -1; width: 100%; height: 6px; accent-color: var(--navy); }
.g-queue li.done .g-qstate { color: var(--leaf); font-weight: 700; }
.g-queue li.done progress { display: none; }
.g-queue li.failed .g-qstate { color: var(--ember); font-weight: 600; white-space: normal; }
@media (max-width: 620px) { .g-upload { grid-template-columns: minmax(0, 1fr); } .g-upload .btn { justify-self: start; } }

/* grid of photos */
.g-grid { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
@media (max-width: 520px) { .g-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; } }
.g-item { position: relative; aspect-ratio: 1; border: 0; padding: 0; cursor: pointer; overflow: hidden; border-radius: 8px; background: color-mix(in srgb, var(--navy) 10%, var(--card)); }
.g-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.g-nothumb { display: block; width: 100%; height: 100%; }
.g-play { position: absolute; left: 8px; bottom: 8px; background: rgb(0 0 0 / 62%); color: #fff; font: 700 0.78rem/1 var(--font-body); padding: 5px 8px; border-radius: 999px; }
.g-item.video .g-nothumb::after { content: "▶"; display: grid; place-items: center; height: 100%; font-size: 2rem; color: var(--muted); }

/* viewer */
.g-noscroll { overflow: hidden; }
.g-viewer { position: fixed; inset: 0; z-index: 50; background: rgb(8 12 18 / 94%); color: #fff; display: grid; grid-template-rows: auto minmax(0, 1fr); }
.g-vbar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; padding: max(10px, env(safe-area-inset-top)) var(--gutter-r) 10px var(--gutter-l); }
.g-vactions { display: flex; gap: 8px; align-items: center; }
.g-viewer .small-btn { padding: 8px 14px; font-size: var(--step--1); }
.g-viewer .btn.ghost { color: #fff; box-shadow: inset 0 0 0 2px rgb(255 255 255 / 70%); }
.g-viewer .btn:not(.ghost) { background: #fff; color: #13233a; }
.g-stage { display: grid; place-items: center; min-height: 0; padding: 0 8px max(8px, env(safe-area-inset-bottom)); }
.g-stage img, .g-stage video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.g-stage video { width: min(100%, 1200px); background: #000; }
.g-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 64px; border: 0; border-radius: 12px; background: rgb(255 255 255 / 12%); color: #fff; font-size: 2.2rem; line-height: 1; cursor: pointer; }
.g-nav:hover { background: rgb(255 255 255 / 22%); }
.g-nav.prev { left: 10px; } .g-nav.next { right: 10px; }
@media (max-width: 620px) { .g-nav { display: none; } }
.g-confirm { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); background: #fff; color: #13233a; border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); width: min(92vw, 360px); }
.g-confirm p { margin: 0 0 10px; font-weight: 600; }
.g-confirm .btn:not(.ghost) { background: var(--ember); color: #fff; }
.g-confirm .btn.ghost { color: #13233a; box-shadow: inset 0 0 0 2px #13233a; }
