/* Colors (day/night) come from the shared theme, https://zerocog.us/theme.css,
   which every page loads first. See the README. */

:root {
  /* The frame behind each picture stays dark in both themes. */
  --frame: #0d0d0d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1rem/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}

.top, main { max-width: 60rem; margin: 0 auto; padding: 0 1rem; }
.top { padding-top: 1.5rem; display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
h1 { margin: 0; font-size: 1.75rem; }
.crumbs { margin: 0 0 0.35rem; font-size: 0.9rem; }
h2 { margin: 2rem 0 0.75rem; font-size: 1.25rem; }
.muted { color: var(--text-dim); }
.status { margin: 1.5rem 0; }
a { color: var(--accent); }
[hidden] { display: none !important; }

img { display: block; width: 100%; height: auto; }

figure { margin: 0; }
figure img, .slideshow img {
  aspect-ratio: 3 / 2;
  object-fit: contain;
  background: var(--frame);
  border-radius: 0.5rem;
}
figcaption, .caption { margin: 0.5rem 0 0; min-height: 3rem; }

.slideshow:focus-visible, button:focus-visible, .grid a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.5rem; }
button {
  min-height: 2.75rem;
  padding: 0 1rem;
  background: var(--bg-elev);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font: inherit;
  cursor: pointer;
}
#counter { margin-left: auto; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: 0.75rem;
  margin: 0 0 3rem;
  padding: 0;
  list-style: none;
}
.grid img { aspect-ratio: 3 / 2; object-fit: cover; background: var(--frame); border-radius: 0.375rem; }
.grid a { display: block; text-decoration: none; color: inherit; }
.grid span { display: block; margin-top: 0.25rem; font-size: 0.875rem; }
