* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, Arial, sans-serif;
  background: #f5f5f5;
  color: #111;
}

h1 {
  text-align: center;
  margin: 20px 0;
}

/* Galerie */
.gallery-track {
  display: flex;
  gap: 16px;
  padding: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.gallery-track::-webkit-scrollbar {
  display: none;
}

.gallery-track img {
  flex: 0 0 70%;
  max-width: 70%;
}

@media (min-width: 900px) {
  .gallery-track img {
    flex: 0 0 320px;
    max-width: 320px;
  }
}


/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.lightbox.active {
  display: flex;
}

.lightbox-img {
  max-width: 95%;
  max-height: 90%;
  border-radius: 10px;
}

.close {
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 40px;
  color: #fff;
  cursor: pointer;
  user-select: none;
}
.nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.4);
  border: none;
  color: white;
  font-size: 40px;
  padding: 10px 18px;
  cursor: pointer;
  user-select: none;
}

.nav:hover {
  background: rgba(0,0,0,0.6);
}

.nav.prev {
  left: 20px;
}

.nav.next {
  right: 20px;
}
img {
  user-drag: none;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: auto;
}

