*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--pix-font);
  font-size: var(--pix-font-sm);
  font-weight: var(--pix-font-weight);
  line-height: var(--pix-line-height);
  color: var(--sprout-ink);
  background: var(--sprout-bg);
}

.gallery-page {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

.gallery-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px 18px;
  background: var(--sprout-panel);
  border: 2px solid var(--sprout-border);
  border-radius: var(--pix-radius);
  box-shadow: var(--neo-raised);
}

.gallery-header__logo {
  display: block;
  flex: 0 1 auto;
  width: auto;
  max-width: min(100%, 320px);
  height: auto;
  max-height: 48px;
  object-fit: contain;
  object-position: left center;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.gallery-empty {
  padding: 48px 24px;
  text-align: center;
  background: var(--sprout-panel);
  border: 2px solid var(--sprout-border);
  border-radius: var(--pix-radius);
  color: var(--sprout-ink-muted);
  box-shadow: var(--neo-inset);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 600px) {
  .gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (min-width: 1440px) {
  .gallery-page {
    padding-left: 24px;
    padding-right: 24px;
  }

  .gallery-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.gallery-card {
  position: relative;
  aspect-ratio: 1;
  min-width: 0;
  margin: 0;
  padding: 0;
  background: var(--sprout-panel);
  border: 2px solid var(--sprout-border);
  border-radius: var(--pix-radius);
  box-shadow: var(--neo-raised);
  overflow: hidden;
  cursor: pointer;
}

.gallery-card.is-selected {
  border-color: #7aadc9;
  box-shadow:
    var(--neo-raised),
    0 0 0 2px #7aadc9;
}

.gallery-card__thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
