[hidden] { display: none !important; }
.gallery-controls-row, .gallery-top-btns { position: relative; z-index: 10; }

.gallery-page-main {
  min-height: 75vh;
  background: #FFFFFF;
}

.gallery-hero-head {
  background: linear-gradient(180deg, #F5F8FA 0%, #FFFFFF 100%);
  padding: 52px 0 28px;
  border-bottom: 1px solid var(--line);
}

.gallery-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 34px;
}

.gallery-title-copy {
  max-width: 640px;
}

.gallery-page-title {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.6vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.22;
  color: var(--ink);
}

.gallery-page-sub {
  margin: 0;
  font-size: 0.96rem;
  color: var(--ink-sub);
  line-height: 1.68;
}

/* 모던 상단 액션 버튼 (+ 새 사진 올리기 / 내 사진 관리) */
.gallery-top-btns {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.gallery-action-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  border: 1px solid var(--berlin);
  background: linear-gradient(135deg, #003A63 0%, #002744 100%);
  color: #FFFFFF;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  box-shadow: 0 8px 20px rgba(0, 49, 83, 0.20);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.gallery-action-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(0, 49, 83, 0.28);
  filter: brightness(1.08);
}

.gallery-action-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  border: 1.5px solid #CBD5E1;
  background: #FFFFFF;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  box-shadow: 0 2px 8px rgba(15, 23, 34, 0.04);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.gallery-action-secondary:hover {
  background: var(--berlin-tint);
  border-color: var(--berlin);
  color: var(--berlin);
  transform: translateY(-2px);
}

/* 카테고리 섹터 필터 바 */
.gallery-controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.gallery-filter-bar {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  background: #EEF3F7;
  border: 1px solid #DCE6F0;
  border-radius: 16px;
}

.gallery-tab-btn {
  padding: 9px 18px;
  border-radius: 11px;
  border: none;
  background: transparent;
  color: var(--ink-sub);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.gallery-tab-btn:hover {
  color: var(--berlin);
  background: rgba(255, 255, 255, 0.6);
}

.gallery-tab-btn.is-active {
  background: var(--berlin);
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 49, 83, 0.22);
}

.gallery-count-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-muted);
}

/* 사진 아카이브 카드 그리드 */
.gallery-archive-section {
  padding: 48px 0 96px;
}

.archive-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.archive-photo-card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.archive-photo-card.is-filtered-out {
  display: none !important;
}

.archive-photo-card:hover {
  transform: translateY(-4px);
  border-color: var(--berlin-border);
  box-shadow: 0 16px 34px rgba(0, 27, 48, 0.09);
}

.archive-open-btn {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
}

.archive-img-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--off-white);
  overflow: hidden;
}

.archive-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

.archive-photo-card:hover .archive-img-wrap img {
  transform: scale(1.05);
}

.archive-cat-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(0, 21, 38, 0.74);
  backdrop-filter: blur(6px);
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.archive-meta-box {
  padding: 18px 20px 20px;
}

.archive-title {
  display: block;
  font-size: 1.04rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
  line-height: 1.4;
}

.archive-author-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.archive-mini-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
}

.archive-cat {
  font-size: 0.82rem;
  color: var(--ink-muted);
  font-weight: 500;
}

/* 빈 카테고리 안내 */
.gallery-empty-state {
  text-align: center;
  padding: 68px 24px;
  background: var(--off-white);
  border: 1px dashed var(--berlin-border);
  border-radius: 24px;
}

.gallery-empty-title {
  margin: 0 0 8px;
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--ink);
}

.gallery-empty-sub {
  margin: 0 0 22px;
  font-size: 0.92rem;
  color: var(--ink-sub);
}

/* 풀스크린 라이트박스 */
.archive-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1650;
  background: rgba(0, 15, 28, 0.94);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  color: #FFFFFF;
}

.archive-lb-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
}

.lb-counter {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--berlin-soft);
}

.lb-top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-lb-download {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(142, 190, 224, 0.45);
  background: rgba(255, 255, 255, 0.10);
  color: #FFFFFF;
  font-size: 0.84rem;
  font-weight: 600;
  transition: background 0.18s ease;
}

.btn-lb-download:hover {
  background: var(--berlin);
}

.btn-lb-close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: transparent;
  color: #FFFFFF;
  font-size: 1.4rem;
  cursor: pointer;
}

.archive-lb-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px 32px;
  min-height: 0;
}

.lb-figure {
  margin: 0 auto;
  max-width: min(1040px, 82vw);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lb-main-img {
  max-height: 74vh;
  width: auto;
  border-radius: 14px;
  object-fit: contain;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.lb-caption {
  margin-top: 14px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.86);
  text-align: center;
}

.btn-lb-nav {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  font-size: 1.8rem;
  cursor: pointer;
  flex-shrink: 0;
}

.btn-lb-nav:hover {
  background: var(--berlin);
}

@media (max-width: 960px) {
  .gallery-title-row { flex-direction: column; align-items: flex-start; }
  .archive-photo-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .archive-photo-grid { grid-template-columns: 1fr; }
  .gallery-top-btns { width: 100%; }
  .gallery-action-primary, .gallery-action-secondary { flex: 1; }
  .btn-lb-nav { width: 38px; height: 38px; font-size: 1.4rem; }
}
