:root {
  --bg: #f3efe7;
  --panel: rgba(255, 251, 247, 0.88);
  --text: #1a1512;
  --muted: #65574f;
  --accent: #9d3d46;
  --accent-dark: #6d1f29;
  --border: rgba(26, 21, 18, 0.12);
  --shadow: 0 24px 60px rgba(56, 34, 24, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(157, 61, 70, 0.18), transparent 32%),
    linear-gradient(180deg, #f7f1e7 0%, #efe6db 100%);
  font-family: Georgia, "Times New Roman", serif;
  min-height: 100vh;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.page-shell {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 4rem;
}

.tagline,
.gallery-meta,
.eyebrow,
.back-link,
.lightbox-caption {
  color: var(--muted);
}

.hero,
.gallery-header,
.empty-state,
.access-help {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: clamp(1.5rem, 3vw, 3rem);
  margin-bottom: 2rem;
}

.access-help {
  padding: 1rem 1.25rem;
}

.access-help--footer {
  margin-top: 2rem;
  margin-bottom: 0;
  padding: 0.75rem 1rem;
}

.access-help p {
  margin: 0;
  line-height: 1.5;
}

.access-help p + p {
  margin-top: 0.45rem;
}

.access-help a {
  color: var(--accent-dark);
}

.hero.compact {
  padding-bottom: 2rem;
}

.eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  line-height: 0.95;
  margin-bottom: 0.75rem;
}

h2 {
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  margin-bottom: 0.5rem;
}

.lede {
  max-width: 42rem;
  font-size: 1.1rem;
  line-height: 1.6;
}

.gallery-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.gallery-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.gallery-card-link {
  display: grid;
  text-decoration: none;
}

.gallery-card-image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.gallery-card-image--contain {
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(255, 251, 247, 0.98), rgba(239, 230, 219, 0.95));
  padding: 1rem;
}

.gallery-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-card-image-fit--contain {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.gallery-card-copy {
  padding: 1rem 1.1rem 1.2rem;
}

.gallery-header {
  display: grid;
  gap: 0.5rem;
}

.gallery-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

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

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.9rem;
}

.image-card {
  margin: 0;
}

.image-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  background: #d8c9b7;
  box-shadow: var(--shadow);
}

.image-trigger img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.gallery-action-button {
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 1.2rem;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font: inherit;
}

.pswp__custom-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  text-decoration: none;
  font-size: 0.92rem;
}

.pswp__custom-link--secondary,
.pswp__button--custom {
  background: rgba(255, 255, 255, 0.08);
}

.pswp__button--custom {
  border-radius: 999px;
  width: auto;
  min-width: 4.2rem;
  padding: 0 0.9rem;
  color: #fff;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.support-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 1.25rem;
}

.support-kv {
  display: grid;
  gap: 0.9rem;
  margin: 1rem 0 0;
}

.support-kv div {
  display: grid;
  gap: 0.2rem;
}

.support-kv dt {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.support-kv dd {
  margin: 0;
  font-size: 1rem;
  word-break: break-word;
}

.support-details {
  margin-top: 1rem;
}

.support-pre {
  overflow-x: auto;
  white-space: pre-wrap;
  background: rgba(26, 21, 18, 0.06);
  border-radius: 16px;
  padding: 0.9rem;
  font-size: 0.9rem;
  line-height: 1.45;
}

.support-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  border-radius: 999px;
  border: 0;
  padding: 0 1.1rem;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
}

.action-link.secondary {
  background: rgba(26, 21, 18, 0.08);
  color: var(--text);
}

.support-label {
  display: block;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.support-input {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.support-note {
  color: var(--muted);
  line-height: 1.55;
  margin-top: 0.8rem;
}

.lightbox-caption {
  margin: 0.85rem 0 0;
}

.lightbox-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 0.85rem;
}

.lightbox-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff8f2;
  text-decoration: none;
  white-space: nowrap;
}

.download-link.secondary {
  background: rgba(255, 248, 242, 0.14);
  color: #fff8f2;
  border: 1px solid rgba(255, 248, 242, 0.32);
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 1rem, 1200px);
    padding-top: 1rem;
  }

  .image-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lightbox-meta {
    flex-direction: column;
    align-items: flex-start;
  }
}
