.galleryPage{
  display:grid;
  gap:16px;
}

.galleryHero,
.galleryFeature,
.galleryCategories,
.galleryDetail__grid{
  border:1px solid rgba(255,255,255,.13);
  border-radius:10px;
  background:
    radial-gradient(460px 220px at 0% 0%, rgba(69,230,255,.12), transparent 70%),
    radial-gradient(420px 240px at 100% 0%, rgba(255,179,71,.12), transparent 72%),
    rgba(0,0,0,.12);
  box-shadow:0 12px 34px rgba(0,0,0,.24);
}

.galleryHero{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  padding:18px;
}

.galleryHero__eyebrow,
.galleryFeature__label{
  color:#ffd38a;
  font-size:11px;
  font-weight:900;
  letter-spacing:.06em;
  text-transform:uppercase;
}

.galleryHero h1{
  margin:4px 0 0;
  font-size:30px;
  line-height:1.06;
}

.galleryHero p{
  max-width:72ch;
  margin:10px 0 0;
  color:var(--muted);
  line-height:1.55;
}

.galleryHero__stats{
  display:grid;
  grid-template-columns:repeat(3, minmax(86px, 1fr));
  gap:10px;
  min-width:330px;
}

.galleryHero__stats div{
  border:1px solid rgba(255,255,255,.11);
  border-radius:8px;
  padding:12px;
  background:rgba(0,0,0,.18);
}

.galleryHero__stats strong,
.galleryHero__stats span{
  display:block;
}

.galleryHero__stats strong{
  font-size:24px;
  line-height:1;
}

.galleryHero__stats span{
  color:var(--muted);
  font-size:12px;
  margin-top:6px;
}

.galleryFeature{
  position:relative;
  display:grid;
  grid-template-columns:180px minmax(0, 1fr);
  align-items:center;
  gap:14px;
  padding:40px 14px 14px;
  color:var(--text);
  text-decoration:none;
}

.galleryFeature:hover{
  border-color:rgba(69,230,255,.32);
  transform:translateY(-1px);
}

.galleryFeature img{
  grid-column:1;
  width:180px;
  aspect-ratio:16/10;
  object-fit:cover;
  border-radius:8px;
  border:1px solid rgba(255,255,255,.12);
  background:#050813;
}

.galleryFeature__body{
  grid-column:2;
  min-width:0;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:6px;
}

.galleryFeature__label{
  position:absolute;
  left:14px;
  top:12px;
}

.galleryFeature__body strong{
  font-size:20px;
  line-height:1.2;
}

.galleryFeature__body small{
  color:var(--muted);
  line-height:1.45;
}

.galleryCategories{
  padding:16px;
}

.galleryCategories__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}

.galleryCategories__head h2{
  margin:4px 0 0;
  font-size:22px;
}

.galleryCategories__grid{
  max-width:100%;
  min-width:0;
  display:flex;
  flex-wrap:nowrap;
  gap:10px;
  overflow-x:auto;
  overflow-y:hidden;
  padding-bottom:4px;
  scrollbar-width:thin;
}

.galleryCategoryTile{
  --gallery-cat:#5dd8ff;
  position:relative;
  flex:1 1 0;
  min-width:104px;
  min-height:76px;
  overflow:hidden;
  display:block;
  border:1px solid color-mix(in srgb, var(--gallery-cat) 48%, rgba(255,255,255,.10));
  border-radius:8px;
  padding:10px;
  color:var(--text);
  text-decoration:none;
  background:
    radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--gallery-cat) 18%, transparent), transparent 54%),
    rgba(0,0,0,.14);
  box-shadow:0 12px 32px rgba(0,0,0,.20);
  transition:border-color .18s ease, background .18s ease, transform .18s ease;
}

.galleryCategoryTile::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:3px;
  background:var(--gallery-cat);
  opacity:.95;
}

.galleryCategoryTile:hover,
.galleryCategoryTile.is-active{
  border-color:color-mix(in srgb, var(--gallery-cat) 76%, rgba(255,255,255,.18));
  background:
    radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--gallery-cat) 28%, transparent), transparent 54%),
    rgba(255,255,255,.045);
}

.galleryCategoryTile:hover{
  transform:translateY(-1px);
}

.galleryCategoryTile__name,
.galleryCategoryTile__count,
.galleryCategoryTile__label{
  position:relative;
  z-index:1;
  display:block;
}

.galleryCategoryTile__name{
  font-size:12px;
  font-weight:900;
  line-height:1.2;
}

.galleryCategoryTile__count{
  margin-top:8px;
  color:var(--gallery-cat);
  font-size:22px;
  font-weight:950;
  line-height:1;
}

.galleryCategoryTile__label{
  color:var(--muted);
  font-size:10px;
  font-weight:800;
  margin-top:2px;
  text-transform:uppercase;
}

.galleryGrid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(210px, 1fr));
  gap:14px;
}

.galleryCard{
  --gallery-cat:#5dd8ff;
  overflow:hidden;
  border:1px solid color-mix(in srgb, var(--gallery-cat) 22%, rgba(255,255,255,.12));
  border-radius:10px;
  background:
    radial-gradient(220px 90px at 0% 0%, color-mix(in srgb, var(--gallery-cat) 10%, transparent), transparent 70%),
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,.14)),
    rgba(0,0,0,.12);
}

.galleryCard__media{
  position:relative;
  display:block;
  aspect-ratio:16/10;
  overflow:hidden;
  color:var(--text);
  text-decoration:none;
  background:#050813;
}

.galleryCard__media img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  transition:transform .2s ease, filter .2s ease;
}

.galleryCard:hover .galleryCard__media img{
  transform:scale(1.035);
  filter:saturate(1.08) brightness(1.04);
}

.galleryCard__pin{
  position:absolute;
  left:10px;
  top:10px;
  border:1px solid rgba(255,211,106,.38);
  border-radius:999px;
  padding:4px 8px;
  color:#ffe2a6;
  background:rgba(0,0,0,.55);
  font-size:11px;
  font-weight:900;
}

.galleryCard__body{
  display:grid;
  gap:6px;
  padding:12px;
}

.galleryCard__body span,
.galleryCard__category{
  color:color-mix(in srgb, var(--gallery-cat) 82%, #ffffff);
  font-size:11px;
  font-weight:900;
  letter-spacing:.06em;
  text-transform:uppercase;
}

.galleryCard__body a{
  color:var(--text);
  font-size:16px;
  font-weight:900;
  line-height:1.2;
  text-decoration:none;
}

.galleryCard__body p{
  margin:0;
  color:var(--muted);
  font-size:13px;
  line-height:1.45;
}

.galleryCard__body small{
  color:rgba(231,236,255,.56);
  font-size:12px;
}

.galleryPlaceholder{
  min-height:120px;
  display:grid;
  place-items:center;
  color:var(--muted);
  font-weight:900;
}

.galleryDetail__top{
  display:flex;
  justify-content:flex-start;
}

.galleryDetail__grid{
  display:grid;
  grid-template-columns:minmax(0, 1.12fr) minmax(320px, .88fr);
  gap:16px;
  padding:16px;
}

.galleryDetail__media{
  margin:0;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.12);
  border-radius:10px;
  background:#050813;
}

.galleryDetail__media img{
  width:100%;
  height:auto;
  display:block;
}

.galleryDetail__body{
  display:flex;
  flex-direction:column;
  gap:14px;
  min-width:0;
}

.galleryDetail__body h1{
  margin:0;
  font-size:30px;
  line-height:1.08;
}

.galleryText{
  border:1px solid rgba(255,255,255,.10);
  border-radius:10px;
  padding:14px;
  background:rgba(0,0,0,.12);
}

.galleryText p{
  margin:0 0 12px;
  color:var(--muted);
  line-height:1.62;
}

.galleryText p:last-child{
  margin-bottom:0;
}

.galleryFacts{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:10px;
  margin:0;
}

.galleryFacts div{
  border:1px solid rgba(255,255,255,.10);
  border-radius:8px;
  padding:10px;
  background:rgba(0,0,0,.13);
}

.galleryFacts dt,
.galleryFacts dd{
  margin:0;
}

.galleryFacts dt{
  color:#ffd38a;
  font-size:11px;
  font-weight:900;
  text-transform:uppercase;
}

.galleryFacts dd{
  margin-top:4px;
  color:var(--text);
  font-weight:800;
}

.adminGalleryStats{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:10px;
  margin:0 0 14px;
}

.adminGalleryStats div{
  border:1px solid rgba(255,255,255,.11);
  border-radius:10px;
  padding:12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(0,0,0,.12)),
    rgba(0,0,0,.10);
}

.adminGalleryStats span,
.adminGalleryStats strong{
  display:block;
}

.adminGalleryStats span{
  color:var(--muted);
  font-size:11px;
  font-weight:900;
  text-transform:uppercase;
}

.adminGalleryStats strong{
  margin-top:4px;
  color:var(--text);
  font-size:26px;
  line-height:1;
}

.adminGalleryThumb{
  width:64px;
  height:54px;
  border:1px solid rgba(69,230,255,.18);
  border-radius:9px;
  overflow:hidden;
  display:grid;
  place-items:center;
  background:rgba(69,230,255,.08);
  color:var(--text);
  font-weight:900;
}

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

.adminGalleryForm__grid{
  display:grid;
  grid-template-columns:minmax(0, 1fr) 290px;
  gap:16px;
  align-items:start;
}

.adminGalleryForm__main,
.adminGalleryForm__side{
  display:grid;
  gap:12px;
}

.adminGalleryPreview{
  aspect-ratio:16/10;
  border:1px solid rgba(255,255,255,.12);
  border-radius:10px;
  overflow:hidden;
  display:grid;
  place-items:center;
  color:var(--muted);
  background:rgba(0,0,0,.18);
}

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

.adminOptionRow{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
}

.adminGalleryCategoryGrid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(250px, 1fr));
  gap:10px;
}

.adminGalleryCategoryWorkspace{
  display:grid;
  gap:14px;
}

.adminGalleryCategoryForm__grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(150px, 1fr));
  gap:12px;
}

.adminGalleryCategory{
  --gallery-cat:#5dd8ff;
  display:grid;
  grid-template-columns:46px minmax(0, 1fr) auto;
  align-items:center;
  gap:12px;
  border:1px solid color-mix(in srgb, var(--gallery-cat) 42%, rgba(255,255,255,.11));
  border-radius:10px;
  padding:12px;
  background:
    radial-gradient(220px 110px at 0% 0%, color-mix(in srgb, var(--gallery-cat) 18%, transparent), transparent 72%),
    rgba(0,0,0,.13);
}

.adminGalleryCategory__swatch{
  width:46px;
  height:46px;
  display:grid;
  place-items:center;
  border:1px solid color-mix(in srgb, var(--gallery-cat) 56%, rgba(255,255,255,.14));
  border-radius:9px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--gallery-cat) 78%, #ffffff), var(--gallery-cat)),
    rgba(255,255,255,.06);
  box-shadow:0 0 18px color-mix(in srgb, var(--gallery-cat) 20%, transparent);
  color:#081018;
  font-size:13px;
  font-weight:950;
  line-height:1;
  text-align:center;
}

.adminGalleryCategory > div > strong,
.adminGalleryCategory > div > span,
.adminGalleryCategory > div > small{
  display:block;
}

.adminGalleryCategory > div > span{
  color:var(--muted);
  margin-top:4px;
  font-size:12px;
}

.adminGalleryCategory > div > small{
  margin-top:6px;
  color:rgba(231,236,255,.58);
  line-height:1.35;
}

.adminGalleryCategory__actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
}

@media (max-width:980px){
  .galleryHero,
  .galleryDetail__grid{
    grid-template-columns:1fr;
  }
  .galleryHero{
    align-items:stretch;
    flex-direction:column;
  }
  .galleryHero__stats,
  .adminGalleryStats{
    min-width:0;
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
  .adminGalleryForm__grid{
    grid-template-columns:1fr;
  }
  .adminGalleryCategoryForm__grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

@media (max-width:640px){
  .galleryHero__stats,
  .galleryFacts,
  .adminGalleryStats{
    grid-template-columns:1fr;
  }
  .galleryFeature{
    grid-template-columns:1fr;
  }
  .galleryFeature__body{
    grid-column:1;
  }
  .galleryFeature img{
    width:100%;
  }
  .adminGalleryCategory,
  .adminGalleryCategoryForm__grid{
    grid-template-columns:1fr;
  }
  .adminGalleryCategory__actions{
    justify-content:flex-start;
    flex-wrap:wrap;
  }
}
