:root {
  --gal-ink: #13261f;
  --gal-teal: #0d6e6e;
  --gal-teal-deep: #0a4f4f;
  --gal-sand: #e8d5b5;
  --gal-coral: #c45c3e;
  --gal-mist: #f3f7f5;
  --gal-card: rgba(255, 255, 255, 0.92);
  --gal-radius: 1rem;
  --gal-shadow: 0 18px 40px rgba(19, 38, 31, 0.12);
}

.gal-body {
  margin: 0;
  min-height: 100vh;
  color: var(--gal-ink);
  font-family: "Segoe UI", "Avenir Next", "Helvetica Neue", sans-serif;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(13, 110, 110, 0.22), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(196, 92, 62, 0.18), transparent 50%),
    linear-gradient(165deg, #f7faf8 0%, #eef4f1 45%, #f8f1e8 100%);
  position: relative;
}

.gal-mesh {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(13, 110, 110, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13, 110, 110, 0.05) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}

.gal-shell {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
}

.gal-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.gal-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.gal-brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--gal-shadow);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.gal-brand-mark img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.gal-brand h1 {
  font-size: 1.15rem;
  margin: 0;
  line-height: 1.25;
  font-weight: 700;
}

.gal-brand p {
  margin: 0.15rem 0 0;
  color: #4d635a;
  font-size: 0.9rem;
}

.gal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.gal-nav a {
  text-decoration: none;
  color: var(--gal-teal-deep);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(13, 110, 110, 0.18);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  transition: transform 0.15s ease, background 0.15s ease;
}

.gal-nav a:hover {
  transform: translateY(-1px);
  background: #fff;
}

.gal-nav a.is-primary {
  background: var(--gal-teal);
  border-color: var(--gal-teal);
  color: #fff;
}

.gal-hero {
  background: linear-gradient(135deg, rgba(13, 110, 110, 0.95), rgba(10, 79, 79, 0.92) 55%, rgba(196, 92, 62, 0.85));
  color: #fff;
  border-radius: calc(var(--gal-radius) + 0.25rem);
  padding: 1.75rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--gal-shadow);
}

.gal-hero h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 750;
}

.gal-hero p {
  margin: 0;
  max-width: 42rem;
  opacity: 0.95;
  line-height: 1.55;
}

.gal-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  opacity: 0.9;
  margin-bottom: 0.55rem;
}

.gal-years {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.5rem;
}

.gal-years a {
  text-decoration: none;
  color: var(--gal-teal-deep);
  background: var(--gal-card);
  border: 1px solid rgba(13, 110, 110, 0.15);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-weight: 650;
  font-size: 0.9rem;
}

.gal-years a.is-active,
.gal-years a:hover {
  background: var(--gal-teal);
  border-color: var(--gal-teal);
  color: #fff;
}

.gal-year-block {
  margin-bottom: 2rem;
}

.gal-year-title {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  margin-bottom: 0.9rem;
}

.gal-year-title h3 {
  margin: 0;
  font-size: 1.35rem;
  color: var(--gal-teal-deep);
}

.gal-year-title span {
  color: #6a7d74;
  font-size: 0.9rem;
}

.gal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.gal-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--gal-card);
  border-radius: var(--gal-radius);
  overflow: hidden;
  border: 1px solid rgba(19, 38, 31, 0.06);
  box-shadow: 0 10px 28px rgba(19, 38, 31, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.gal-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--gal-shadow);
  color: inherit;
}

.gal-card-cover {
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(135deg, rgba(13, 110, 110, 0.35), rgba(196, 92, 62, 0.3)),
    #d7e4df;
  position: relative;
  overflow: hidden;
}

.gal-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gal-card-body {
  padding: 0.9rem 1rem 1.05rem;
}

.gal-card-body h4 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.gal-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  color: #5d7168;
  font-size: 0.85rem;
}

.gal-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.gal-badge--public {
  background: rgba(13, 110, 110, 0.12);
  color: var(--gal-teal-deep);
}

.gal-badge--private {
  background: rgba(196, 92, 62, 0.14);
  color: #8a3a24;
}

.gal-empty {
  background: var(--gal-card);
  border-radius: var(--gal-radius);
  padding: 2rem 1.25rem;
  text-align: center;
  color: #5d7168;
  border: 1px dashed rgba(13, 110, 110, 0.25);
}

.gal-footer {
  margin-top: 2.5rem;
  text-align: center;
  color: #6a7d74;
  font-size: 0.85rem;
}

.gal-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--gal-teal-deep);
  text-decoration: none;
  font-weight: 650;
  margin-bottom: 1rem;
}

.gal-back:hover {
  color: var(--gal-coral);
}

.gal-event-head {
  margin-bottom: 1.25rem;
}

.gal-event-head h2 {
  margin: 0.25rem 0 0.4rem;
  font-size: clamp(1.4rem, 2.8vw, 1.9rem);
}

.gal-event-head p {
  margin: 0;
  color: #4d635a;
  max-width: 40rem;
  line-height: 1.5;
}

.gal-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}

.gal-photo {
  display: block;
  border-radius: 0.75rem;
  overflow: hidden;
  aspect-ratio: 1;
  background: #d7e4df;
  box-shadow: 0 8px 20px rgba(19, 38, 31, 0.1);
  position: relative;
  margin: 0;
  width: 100%;
  padding: 0;
  border: 0;
  cursor: zoom-in;
  text-align: left;
}

.gal-photo > a {
  display: block;
  width: 100%;
  height: 100%;
}

.gal-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
  pointer-events: none;
}

.gal-photo:hover img {
  transform: scale(1.04);
}

.gal-photo-actions {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 3;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.gal-photo:hover .gal-photo-actions,
.gal-photo:focus-within .gal-photo-actions {
  opacity: 1;
  transform: translateY(0);
}

.gal-download {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  text-decoration: none;
  color: #fff;
  background: rgba(19, 38, 31, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 650;
}

.gal-download:hover {
  background: var(--gal-teal);
  color: #fff;
}

.gal-photo figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.45rem 0.55rem;
  background: linear-gradient(transparent, rgba(19, 38, 31, 0.75));
  color: #fff;
  font-size: 0.78rem;
  z-index: 2;
  pointer-events: none;
}

body.gal-lightbox-open {
  overflow: hidden;
}

.gal-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
}

.gal-lightbox[hidden] {
  display: none !important;
}

.gal-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 18, 0.88);
}

.gal-lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(96vw, 1100px);
  height: min(92vh, 860px);
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 0.75rem;
}

.gal-lightbox-stage {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  background: #0f1c18;
  min-height: 0;
}

.gal-lightbox-stage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}

.gal-lightbox-close {
  position: absolute;
  top: -0.15rem;
  right: 0;
  z-index: 5;
  width: 2.4rem;
  height: 2.4rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.gal-lightbox-nav {
  position: absolute;
  top: 45%;
  z-index: 5;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.gal-lightbox-prev { left: 0.35rem; }
.gal-lightbox-next { right: 0.35rem; }

.gal-lightbox-nav:hover,
.gal-lightbox-close:hover {
  background: var(--gal-teal);
}

.gal-lightbox-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
  padding: 0 0.25rem 0.25rem;
}

.gal-lightbox-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

#galLightboxCounter {
  font-weight: 700;
  font-size: 0.9rem;
  opacity: 0.9;
}

#galLightboxCaption {
  font-size: 0.92rem;
  opacity: 0.85;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: min(70vw, 40rem);
}

.gal-lightbox-download {
  flex-shrink: 0;
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
}

@media (max-width: 640px) {
  .gal-lightbox-dialog {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    gap: 0.5rem;
  }

  .gal-lightbox-stage {
    border-radius: 0;
  }

  .gal-lightbox-nav {
    width: 2.35rem;
    height: 2.35rem;
  }

  .gal-lightbox-prev { left: 0.2rem; }
  .gal-lightbox-next { right: 0.2rem; }
}

.gal-download-note {
  margin: 0.75rem 0 0;
  color: #4d635a;
  font-size: 0.92rem;
}

.gal-verify-card {
  background: var(--gal-card);
  border-radius: var(--gal-radius);
  box-shadow: var(--gal-shadow);
  border: 1px solid rgba(19, 38, 31, 0.06);
  padding: 1.25rem 1.35rem 1.5rem;
  max-width: 520px;
}

.gal-verify-preview {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  margin-bottom: 1.1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(13, 110, 110, 0.12);
  position: relative;
}

.gal-verify-thumb {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: 0.65rem;
  background-size: cover;
  background-position: center;
  pointer-events: none;
}

.gal-verify-preview .gal-shield {
  border-radius: 0.65rem;
  width: 72px;
  height: 72px;
  inset: auto;
  left: 0;
  top: 0;
}

.gal-verify-preview img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 0.65rem;
}

.gal-card-cover {
  position: relative;
}

.gal-card-cover .gal-photo-visual {
  position: absolute;
  inset: 0;
}

.gal-verify-form label {
  display: block;
  font-weight: 650;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.gal-verify-form input {
  width: 100%;
  border: 1px solid rgba(13, 110, 110, 0.28);
  border-radius: 0.65rem;
  padding: 0.65rem 0.8rem;
  font-size: 1rem;
  margin-bottom: 0.65rem;
}

.gal-verify-help {
  color: #5d7168;
  font-size: 0.85rem;
  margin: 0 0 1rem;
  line-height: 1.45;
}

.gal-verify-help a {
  color: var(--gal-teal-deep);
  font-weight: 650;
}

.gal-verify-form button {
  border: 0;
  background: var(--gal-teal);
  color: #fff;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.6rem 1.15rem;
  cursor: pointer;
}

.gal-verify-form button:hover {
  background: var(--gal-teal-deep);
}

@media (max-width: 576px) {
  .gal-shell {
    padding: 1rem 0.9rem 2rem;
  }

  .gal-brand h1 {
    font-size: 1rem;
  }
}
