/* gallery.html only — reuses the :root tokens/fonts from style.css. */

.gallery-body {
  margin: 0;
  min-height: 100vh;
  color: var(--cream);
}

.gallery-page-bg {
  position: fixed;
  inset: 0;
  background-image: url("assets/mainref-portrait.jpg");
  background-size: cover;
  background-position: 50% 15%;
}

.gallery-page-scrim {
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(76, 52, 44, 0.55), rgba(76, 52, 44, 0.75));
}

.gallery-page {
  position: relative;
  z-index: 1;
  max-width: 40rem;
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
}

.gallery-back {
  align-self: flex-start;
  font-family: var(--font-label);
  font-size: 0.85rem;
  color: var(--cream);
  text-decoration: none;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.gallery-page .inv-title {
  color: var(--cream);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.55);
}

.gallery-page .inv-body {
  color: var(--cream);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.gallery-upload-input {
  position: relative;
  display: inline-block;
  cursor: pointer;
  font-family: var(--font-label);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--brown);
  background: linear-gradient(135deg, var(--gold) 0%, #F0C878 50%, var(--gold) 100%);
  padding: 1rem 2rem;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(216, 165, 67, 0.45);
  margin: 1rem 0;
  transition: transform 0.15s ease;
}

.gallery-upload-input:hover {
  transform: translateY(-2px);
}

.gallery-upload-input input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.gallery-status,
.gallery-empty {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--cream);
  opacity: 0.85;
}

.gallery-status:empty {
  display: none;
}

.gallery-empty.is-hidden {
  display: none;
}

.gallery-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: 0.7rem;
}

.gallery-grid-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.gallery-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-grid-item button {
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
  width: 1.6rem;
  height: 1.6rem;
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
}
