:root {
  --gold:#f2b705
}
body {
  background:#0a0b0d!important;
  color:#f4f0e7!important;
  margin:0!important;
  font-family:Arial,sans-serif!important
}
body:before {
  content:none!important
}
.gallery-hero {
  position:relative;
  min-height:670px;
  display:flex;
  align-items:center;
  overflow:hidden;
  padding:80px clamp(22px,8vw,130px);
  background:radial-gradient(ellipse at 80% 20%,#5c400f 0,transparent 45%),linear-gradient(140deg,#1b1b1c,#090a0c 65%);
  box-sizing:border-box
}
.gallery-hero:before {
  content:'';
  position:absolute;
  inset:0;
  background:repeating-linear-gradient(90deg,transparent 0 119px,#f2b70510 120px),repeating-linear-gradient(0deg,transparent 0 119px,#f2b70510 120px);
  transform:perspective(600px) rotateX(30deg) scale(1.5)
}
.gallery-orbit {
  position:absolute;
  right:-9%;
  top:-20%;
  width:55vw;
  aspect-ratio:1;
  border:1px solid #f2b7056b;
  border-radius:50%;
  box-shadow:0 0 0 70px #f2b70508,0 0 0 140px #f2b70508;
  animation:spin 30s linear infinite
}
.gallery-orbit:before {
  content:'';
  position:absolute;
  inset:20%;
  border:1px dashed #f2b70588;
  border-radius:50%
}
@keyframes spin {
  to {
    transform:rotate(360deg)
  }
}
.gallery-hero-inner {
  position:relative;
  z-index:1;
  max-width:1100px
}
.eyebrow {
  font-size:12px;
  color:var(--gold);
  font-weight:900;
  letter-spacing:.3em
}
.gallery-hero h1 {
  font-size:clamp(57px,9vw,140px);
  font-weight:950;
  letter-spacing:-.08em;
  line-height:.87;
  margin:38px 0
}
.gallery-hero h1 em {
  color:var(--gold);
  font-style:normal
}
.gallery-hero-inner>p:not(.eyebrow) {
  font-size:18px;
  line-height:1.7;
  max-width:550px;
  color:#d4cfc5
}
.hero-link {
  display:inline-block;
  margin-top:25px;
  background:var(--gold);
  color:#12100b!important;
  padding:17px 25px;
  font-weight:900;
  text-decoration:none;
  font-size:12px;
  letter-spacing:.1em
}
.gallery-side-note {
  position:absolute;
  right:4vw;
  bottom:30px;
  color:#c1a65b;
  letter-spacing:.3em;
  font-size:10px
}
.gallery-main {
  max-width:1450px;
  margin:auto;
  padding:90px clamp(18px,4vw,60px)
}
.gallery-intro {
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:30px;
  margin-bottom:45px
}
.gallery-intro h2,.gallery-contribute h2 {
  font-size:clamp(35px,5vw,75px);
  letter-spacing:-.065em;
  margin:12px 0
}
.gallery-intro>p {
  max-width:340px;
  line-height:1.7;
  color:#bcb5a7
}
.gallery-controls {
  display:flex;
  flex-wrap:wrap;
  justify-content:space-between;
  gap:20px;
  padding:25px 0;
  border-top:1px solid #554626;
  border-bottom:1px solid #554626
}
.category-filters {
  display:flex;
  flex-wrap:wrap;
  gap:8px
}
.category-filters button {
  cursor:pointer;
  background:#1a1b1c;
  color:#d8d0c0;
  border:1px solid #55472a;
  padding:13px 18px;
  font-weight:800;
  font-size:12px;
  transition:background .2s,color .2s
}
.category-filters button.active,.category-filters button:hover {
  background:var(--gold);
  color:#15120a;
  border-color:var(--gold)
}
.gallery-search-label {
  display:flex;
  flex-direction:column;
  gap:6px;
  color:#d0b35c;
  font-size:10px;
  font-weight:800;
  letter-spacing:.14em
}
.gallery-search-label input {
  background:#191a1b;
  border:1px solid #55472a;
  padding:13px;
  color:#fff;
  min-width:min(310px,80vw);
  font-size:13px
}
.gallery-status {
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:28px 0;
  color:#c9b78e;
  font-size:11px;
  letter-spacing:.15em;
  font-weight:800
}
.photo-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px
}
.photo-tile {
  position:relative;
  cursor:pointer;
  display:block;
  overflow:hidden;
  background:#202020;
  border:1px solid #3e3627;
  padding:0;
  aspect-ratio:4/3;
  text-align:left
}
.photo-tile:nth-child(7n+2),.photo-tile:nth-child(7n+6) {
  aspect-ratio:4/4.2
}
.photo-tile img {
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .65s ease,filter .65s;
  filter:saturate(.82)
}
.photo-tile:hover img,.photo-tile:focus-visible img {
  transform:scale(1.07);
  filter:saturate(1.1)
}
.tile-label {
  position:absolute;
  left:18px;
  bottom:18px;
  color:#fff;
  font-size:12px;
  text-transform:uppercase;
  font-weight:900;
  letter-spacing:.13em;
  text-shadow:0 1px 10px #000
}
.tile-arrow {
  position:absolute;
  right:15px;
  top:15px;
  background:var(--gold);
  color:#111;
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  font-size:20px
}
.gallery-empty {
  padding:70px 20px;
  text-align:center;
  border:1px solid #55472a;
  color:#bcb5a7
}
.gallery-contribute {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:30px;
  margin-top:100px;
  padding:55px;
  background:linear-gradient(130deg,#28200e,#141517);
  border:1px solid #6a562b
}
.gallery-contribute p:not(.eyebrow) {
  color:#d3cbbb;
  line-height:1.7;
  max-width:550px
}
.gallery-contribute a {
  flex:0 0 auto;
  background:var(--gold);
  color:#111;
  text-decoration:none;
  padding:18px 25px;
  font-weight:900;
  font-size:12px;
  letter-spacing:.08em
}
.photo-dialog {
  position:fixed;
  inset:0;
  max-width:none;
  max-height:none;
  width:100vw;
  height:100dvh;
  box-sizing:border-box;
  padding:20px;
  background:#08090bf7;
  color:#fff;
  border:0;
  overflow:hidden
}
.photo-dialog::backdrop {
  background:#000e
}
.lightbox-top,.lightbox-bottom {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  min-height:50px;
  color:#f2b705;
  font-size:12px;
  letter-spacing:.16em;
  font-weight:800
}
.lightbox-top button {
  background:none;
  color:#fff;
  border:1px solid #63542c;
  cursor:pointer;
  font-size:22px;
  width:46px;
  height:46px
}
.lightbox-stage {
  height:calc(100% - 125px);
  display:flex;
  justify-content:center;
  align-items:center;
  gap:15px
}
.lightbox-stage img {
  max-width:calc(100% - 115px);
  max-height:100%;
  object-fit:contain
}
.lightbox-stage button {
  flex:0 0 48px;
  height:70px;
  background:#1c1d1e;
  color:#f2b705;
  border:1px solid #514426;
  font-size:44px;
  cursor:pointer
}
.lightbox-bottom a {
  color:#f2b705
}
.lightbox-open {
  overflow:hidden
}
footer {
  text-align:center;
  background:#070809!important;
  color:#aaa!important;
  padding:35px!important
}
@media(max-width:850px) {
  .photo-grid {
    grid-template-columns:repeat(2,minmax(0,1fr))
  }
  .gallery-intro,.gallery-contribute {
    flex-direction:column;
    align-items:start
  }
  .gallery-hero {
    min-height:560px
  }
  .gallery-orbit {
    width:95vw;
    right:-45vw
  }
  .gallery-contribute {
    padding:30px
  }
}
@media(max-width:540px) {
  .photo-grid {
    grid-template-columns:1fr
  }
  .gallery-status span:last-child {
    display:none
  }
  .gallery-hero {
    padding:60px 20px
  }
  .gallery-controls {
    display:block
  }
  .gallery-search-label {
    margin-top:20px
  }
  .lightbox-stage {
    gap:4px
  }
  .lightbox-stage button {
    flex-basis:35px;
    width:35px;
    font-size:30px
  }
  .lightbox-stage img {
    max-width:calc(100% - 80px)
  }
  .photo-dialog {
    padding:10px
  }
}
@media(prefers-reduced-motion:reduce) {
  .gallery-orbit {
    animation:none
  }
  .photo-tile img {
    transition:none
  }
}
/* Gallery stability fixes: keep modal hidden until opened; prevent global styles from breaking layout. */
html body .photo-dialog:not([open]) {
  display:none!important;
  visibility:hidden!important;
  pointer-events:none!important
}
html body .photo-dialog[open] {
  display:block!important;
  visibility:visible!important;
  z-index:999999!important;
  margin:0!important
}
html body .photo-grid {
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  align-items:stretch!important
}
html body .photo-tile {
  min-width:0!important;
  max-width:none!important;
  box-sizing:border-box!important
}
html body .photo-tile img {
  width:100%!important;
  height:100%!important;
  object-fit:cover!important
}
.gallery-asset-warning {
  padding:16px 20px;
  background:#342817;
  border:1px solid #f2b705;
  color:#ffe6a2;
  margin-bottom:18px;
  line-height:1.5
}
@media(max-width:850px) {
  html body .photo-grid {
    grid-template-columns:repeat(2,minmax(0,1fr))!important
  }
}
@media(max-width:540px) {
  html body .photo-grid {
    grid-template-columns:1fr!important
  }
}
.photo-missing-label {
  display:grid;
  place-items:center;
  height:100%;
  padding:22px;
  text-align:center;
  color:#f2b705;
  font-size:15px;
  font-weight:bold
}
