:root {
  --bg: #faf8f5;
  --text: #2b2420;
  --accent: #a9775c;
  --card-bg: #ffffff;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.site-header {
  text-align: center;
  padding: 2.5rem 1rem 1.5rem;
}

.site-header h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.subtitle {
  margin: 0.4rem 0 0;
  color: #6b5f56;
  font-size: 1rem;
}

.status {
  text-align: center;
  color: #6b5f56;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 6px;
  padding: 0 6px 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.gallery-item {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 6px;
  background: var(--card-bg);
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}

.gallery-item:hover img {
  transform: scale(1.04);
}

.site-footer {
  text-align: center;
  padding: 1.5rem;
  color: #9a8c80;
  font-size: 0.9rem;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 6, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-img {
  max-width: 92vw;
  max-height: 86vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-close,
.lightbox-nav,
.lightbox-download {
  position: absolute;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close:hover,
.lightbox-nav:hover,
.lightbox-download:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox-close {
  top: 1rem;
  right: 1rem;
}

.lightbox-prev {
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-download {
  bottom: 1.5rem;
  right: 1rem;
  width: auto;
  padding: 0 1.2rem;
  border-radius: 24px;
  font-size: 1rem;
  text-decoration: none;
  gap: 0.4rem;
}

@media (max-width: 640px) {
  .lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1815;
    --text: #f2ece6;
    --card-bg: #262220;
    color-scheme: dark;
  }
  .subtitle,
  .status {
    color: #b8aca0;
  }
}
