* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #0a0a0a;
  color: #f2ede4;
  font-family: -apple-system, 'Helvetica Neue', Arial, sans-serif;
  min-height: 100%;
}

.header {
  text-align: center;
  padding: 28px 16px 16px;
}

.header h1 {
  font-family: Georgia, 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', serif;
  font-size: 1.9rem;
  margin: 0 0 6px;
  letter-spacing: 0.02em;
}

.subtitle {
  margin: 0;
  opacity: 0.75;
  font-size: 0.95rem;
}

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 12px 40px;
}

.upload-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 0 28px;
}

.upload-btn {
  display: inline-block;
  background: #d8b98c;
  color: #1a1408;
  font-weight: 600;
  font-size: 1.05rem;
  padding: 16px 28px;
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
  text-align: center;
}

.upload-btn:active {
  transform: scale(0.97);
}

.upload-btn.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.status {
  min-height: 1.2em;
  font-size: 0.9rem;
  opacity: 0.85;
  margin: 0;
  text-align: center;
}

.status.error {
  color: #ff8a80;
}

.status.success {
  color: #9be89b;
}

.gallery-section {
  padding-top: 8px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

@media (min-width: 480px) {
  .gallery { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 700px) {
  .gallery { grid-template-columns: repeat(5, 1fr); }
}

.gallery-item {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #161616;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
  transition: opacity 0.25s ease;
}

.empty-msg {
  text-align: center;
  opacity: 0.55;
  font-size: 0.9rem;
  padding: 30px 0;
}

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

.lightbox[hidden] { display: none; }

.lightbox img {
  max-width: 94vw;
  max-height: 92vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #f2ede4;
  font-size: 1.3rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
}
