body {
  margin: 0;
  background: #e2c8ac;
  color: #1a1a1a;
  font-family: serif;
}

/* HEADER */
.gallery-header {
  text-align: center;
  padding: 2.5rem 1rem 1.5rem;
}

.seal {
  font-size: 4.5rem;
  color: #8b1d18;
  font-family: "Noto Serif JP", serif;
}

.seal-link {
  text-decoration: none;
}

.subtitle {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  color: #8b1d18;
}

/* GRID */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

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

/* CARD */
.card {
  position: relative;
  cursor: pointer;
}

.card img {
  width: 100%;
  display: block;
}

/* STACK */
.card.stack::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(0,0,0,0.15);
  z-index: -1;
}

/* MODAL */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-box {
  background: #e2c8ac;
  max-width: 1000px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  border: 1px solid rgba(0,0,0,0.3);
}

.modal-close {
  position: absolute;
  top: 0.8rem;
  right: 1rem;
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
}

/* MODAL CONTENT */
.modal-content {
  display: flex;
  gap: 2rem;
}

@media (max-width: 700px) {
  .modal-content {
    flex-direction: column;
  }
}

.modal-images img {
  width: 100%;
}

.thumbnails {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.thumbnails img {
  width: 60px;
  cursor: pointer;
  border: 1px solid rgba(0,0,0,0.3);
}

.lead {
  font-weight: bold;
  margin-bottom: 1rem;
}

/* =========================
   NAWIGACJA W NAGŁÓWKU
========================= */
.header-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.back-link {
  font-size: 2rem;
  text-decoration: none;
  color: #8b1d18;
  line-height: 1;
}

.back-link:hover {
  opacity: 0.7;
}

.seal-link {
  text-decoration: none;
}

.seal {
  font-size: 4.5rem;
  color: #8b1d18;
  font-family: "Noto Serif JP", serif;
  line-height: 1;
}
