* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: #0d1117;
  color: #f3f3f3;
}

body {
  min-height: 100vh;
}

#gallery {
  display: flex;
  gap: 8px;
  padding: 8px;
  width: 100%;
  min-height: 100vh;
}

.gallery-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.gallery-sentinel {
  width: 100%;
  height: 1px;
}

.tile {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  margin: 0;
  background: #2b2b2b;
  overflow: hidden;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 300ms ease;
}

.tile.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

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

.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  z-index: 50;
}

.lightbox.open {
  display: flex;
}

.lightbox-image {
  max-width: min(94vw, 1800px);
  max-height: 92vh;
  object-fit: contain;
}

.lightbox-close,
.lightbox-nav {
  position: fixed;
  border: 0;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  cursor: pointer;
  line-height: 1;
}

.lightbox-close {
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  font-size: 32px;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 72px;
  border-radius: 12px;
  font-size: 48px;
}

.lightbox-prev {
  left: 16px;
}

.lightbox-next {
  right: 16px;
}

.gallery-error {
  margin: 0;
  padding: 24px;
}
