/* Reset & base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-dark: #0a0a0a;
  --bg-panel: #141414;
  --text-primary: #f5f0e8;
  --text-muted: rgba(245, 240, 232, 0.55);
  --accent: #c9a96e;
  --accent-glow: rgba(201, 169, 110, 0.35);
  --border: rgba(255, 255, 255, 0.08);
  --font-display: 'Cinzel', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --navbar-height: 72px;
  --category-height: 120px;
  --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.hidden {
  display: none !important;
}

/* Preloader */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-dark);
  transition: opacity 0.6s var(--transition-smooth), visibility 0.6s;
}

#preloader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-inner {
  text-align: center;
}

.preloader-ring {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.preloader-text {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Navbar */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--navbar-height);
  pointer-events: none;
}

.navbar-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.25rem 2rem;
  height: 100%;
}

.link-wrapper {
  pointer-events: auto;
}

.home-link {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0;
  transform: translateY(-8px);
  transition: color 0.3s, opacity 0.4s, transform 0.4s;
}

.home-link.visible {
  opacity: 1;
  transform: translateY(0);
}

.home-link:hover {
  color: var(--accent);
}

.welcome-text {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(0.75rem, 1.5vw, 0.95rem);
  line-height: 1.5;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.welcome-text em {
  font-style: normal;
  color: var(--accent);
}

.category-label {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-top: 0.35rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s, transform 0.5s;
}

.category-label.visible {
  opacity: 1;
  transform: translateY(0);
}

.nav-link {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-right: 1.25rem;
  transition: color 0.3s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
}

.attribution {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* Main gallery area */
#gallery {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.view {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.8s var(--transition-smooth), visibility 0.8s;
}

.view.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Panels set visibility/pointer-events inline, which re-enables hit-testing
   even when the parent view is hidden. Force them off whenever the gallery
   is not the active interactive surface. */
#artworkView:not(.active) {
  display: none;
}

#artworkView:not(.active) *,
#gallery.landing-page #artworkView,
#gallery.landing-page #artworkView * {
  pointer-events: none !important;
}

#artworkView:not(.active) .art-panel {
  visibility: hidden !important;
}

/* Landing / About scroll view */
#landingView {
  overflow: hidden;
}

#gallery.landing-page #landingView.active {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

#galleryPromptView {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.gallery-prompt {
  text-align: center;
  padding: 2rem 1.5rem calc(var(--category-height) + 2rem);
  max-width: 36rem;
}

.gallery-prompt-eyebrow {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.gallery-prompt-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4.5vw, 2.6rem);
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 1rem;
  line-height: 1.25;
}

.gallery-prompt-text {
  font-family: 'Libre Baskerville', 'Times New Roman', Times, serif;
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  font-weight: 400;
  line-height: 1.7;
  color: rgba(245, 240, 232, 0.65);
  margin-bottom: 1.75rem;
}

.gallery-prompt-arrow {
  font-size: 1.4rem;
  color: var(--accent);
  opacity: 0.85;
  animation: promptBounce 1.8s ease-in-out infinite;
}

@keyframes promptBounce {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.55;
  }
  50% {
    transform: translateY(8px);
    opacity: 1;
  }
}

.about-landing-scroll {
  position: relative;
  width: 100%;
  padding-bottom: calc(var(--category-height) + 1.5rem);
  background: #000;
}

#landingView .about-hero {
  --nav-height: var(--navbar-height);
}

#landingView .about-logo {
  width: min(820px, 110%);
  max-width: none;
  transform: scale(1.12);
  transform-origin: top left;
}

#landingView .about-intro {
  padding-top: 0.35rem !important;
  padding-bottom: 2rem !important;
}

#landingView .about-intro .about-text {
  margin-top: 0.25rem;
  margin-left: clamp(3.5rem, 10vw, 8rem);
}

#landingView .about-philosophy {
  padding-left: clamp(3.5rem, 12vw, 9rem);
}

/* Landing: drop desktop OC clearances on stacked mobile layout */
@media (max-width: 900px) {
  #landingView .about-logo {
    width: min(520px, 100%);
    max-width: 100%;
    transform: none;
    transform-origin: top center;
    margin-inline: auto;
  }

  #landingView .about-intro {
    padding-top: 0 !important;
    padding-bottom: 2rem !important;
  }

  #landingView .about-intro .about-text {
    margin-top: 0.75rem;
    margin-left: 0;
    max-width: none;
    width: 100%;
  }

  #landingView .about-philosophy {
    padding-left: 0;
  }
}

.about-explore-hint {
  font-family: var(--font-display);
  font-size: clamp(0.72rem, 1.3vw, 0.88rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(201, 169, 110, 0.9);
  margin-top: 0.5rem;
}

.page-background {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1a1510 0%, #0d0d0d 40%, #12100e 100%);
}

.vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(0, 0, 0, 0.7) 100%);
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Artwork view – floating panels */
#artworkView {
  background: var(--bg-dark);
}

.panels-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.gallery-track,
.gallery-canvas {
  position: relative;
  height: 100%;
  backface-visibility: hidden;
}

#artworkView.is-sliding .gallery-canvas {
  will-change: transform;
}

.art-panel {
  position: absolute;
  border-radius: 4px;
  overflow: hidden;
  padding: 6px;
  background: linear-gradient(145deg, #2a2520, #1a1714);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.6),
    0 0 0 1.5px rgba(201, 169, 110, 0.72),
    0 0 0 3px rgba(243, 230, 200, 0.28),
    0 0 26px rgba(201, 169, 110, 0.28),
    inset 0 1px 0 rgba(255, 248, 230, 0.1);
  cursor: pointer;
  will-change: transform;
  transition:
    opacity 0.45s ease,
    filter 0.45s ease,
    box-shadow 0.4s ease,
    background 0.4s ease;
}

@media (hover: hover) {
  #artworkView.panel-spotlight-active .art-panel:not(.panel-spotlight-focus) {
    filter: blur(5px) brightness(0.38) !important;
    opacity: 0.42 !important;
  }

  #artworkView.panel-spotlight-active .art-panel.panel-spotlight-focus {
    filter: brightness(1.06) !important;
    opacity: 1 !important;
    z-index: 20;
  }

  #artworkView.panel-spotlight-active .art-panel.panel-group-focus {
    box-shadow:
      0 12px 40px rgba(0, 0, 0, 0.75),
      0 0 0 1px rgba(201, 169, 110, 0.45),
      0 0 0 2px rgba(243, 230, 200, 0.18),
      0 0 22px rgba(201, 169, 110, 0.28),
      inset 0 0 0 1px rgba(201, 169, 110, 0.2);
  }

  #artworkView.panel-spotlight-active .art-panel.panel-group-focus::before {
    opacity: 0.85;
    border-color: rgba(201, 169, 110, 0.55);
  }

  #artworkView.panel-spotlight-active .art-panel.panel-group-focus::after {
    opacity: 1;
  }

  #artworkView.panel-spotlight-active .art-panel.panel-group-focus .panel-caption {
    opacity: 0.72;
    transform: translateY(0);
  }

  #artworkView.panel-spotlight-active .art-panel.panel-spotlight-focus:hover,
  #artworkView.panel-spotlight-active .art-panel.panel-group-focus:hover {
    box-shadow:
      0 16px 48px rgba(0, 0, 0, 0.82),
      0 0 0 1px rgba(201, 169, 110, 0.75),
      0 0 0 3px rgba(243, 230, 200, 0.28),
      0 0 32px rgba(201, 169, 110, 0.42),
      inset 0 0 0 1px rgba(243, 230, 200, 0.35);
  }
}

#artworkView.emotes-collecting .art-panel.is-collecting {
  z-index: 30;
  pointer-events: none;
  transition: box-shadow 0.35s ease;
}

#artworkView.emotes-collecting .art-panel:not(.is-collecting) {
  filter: blur(6px) brightness(0.3) !important;
  opacity: 0.35 !important;
  pointer-events: none;
}

#artworkView.is-sliding .art-panel {
  transition: box-shadow 0.4s;
}

#artworkView.is-sliding.panel-spotlight-active .art-panel {
  filter: none !important;
  opacity: inherit !important;
}

.category-stage {
  display: none;
}

.art-panel::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 2px solid rgba(243, 230, 200, 0.82);
  border-radius: 2px;
  pointer-events: none;
  z-index: 3;
  opacity: 1;
  box-shadow:
    0 0 0 1px rgba(201, 169, 110, 0.4),
    inset 0 0 14px rgba(201, 169, 110, 0.14);
  transition:
    border-color 0.35s ease,
    box-shadow 0.35s ease,
    opacity 0.35s ease;
}

.art-panel::after {
  content: '';
  position: absolute;
  inset: 6px;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.88) 0%,
    rgba(0, 0, 0, 0.55) 38%,
    transparent 72%
  );
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
  border-radius: 2px;
  z-index: 1;
}

.art-panel:hover {
  background: linear-gradient(145deg, #3a3228, #221c16);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.82),
    0 0 0 1px rgba(201, 169, 110, 0.7),
    0 0 0 3px rgba(243, 230, 200, 0.25),
    0 0 34px rgba(201, 169, 110, 0.4),
    inset 0 1px 0 rgba(255, 248, 230, 0.12);
  z-index: 10;
}

.art-panel:hover::before {
  inset: 4px;
  border-color: rgba(250, 240, 215, 0.95);
  box-shadow:
    0 0 0 1px rgba(201, 169, 110, 0.5),
    inset 0 0 16px rgba(201, 169, 110, 0.18);
}

.art-panel.art-panel-emblem {
  z-index: 15;
}

.art-panel.art-panel-crop img {
  transform: scale(1.08);
  transform-origin: center center;
  object-fit: cover;
}

.art-panel:hover::after {
  opacity: 1;
}

.art-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px;
  display: block;
}

.art-panel .panel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: clamp(0.9rem, 2.2vw, 1.45rem) clamp(0.75rem, 1.8vw, 1.2rem);
  font-family: var(--font-display);
  font-size: clamp(0.85rem, 1.55vw, 1.2rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.25;
  text-transform: uppercase;
  text-align: center;
  color: #f3e6c8;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.9),
    0 2px 12px rgba(0, 0, 0, 0.75),
    0 0 18px rgba(201, 169, 110, 0.35);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  z-index: 4;
  pointer-events: none;
}

.art-panel:hover .panel-caption {
  opacity: 1;
  transform: translateY(0);
}

@media (hover: hover) {
  #artworkView.panel-spotlight-active .art-panel.panel-spotlight-focus::after {
    opacity: 1;
  }

  #artworkView.panel-spotlight-active .art-panel.panel-spotlight-focus::before {
    opacity: 1;
    border-color: rgba(243, 230, 200, 0.8);
    box-shadow:
      0 0 0 1px rgba(201, 169, 110, 0.3),
      inset 0 0 10px rgba(201, 169, 110, 0.1);
  }

  #artworkView.panel-spotlight-active .art-panel.panel-group-focus:not(:hover) .panel-caption {
    opacity: 0.72;
    font-size: clamp(0.72rem, 1.2vw, 0.95rem);
    color: rgba(243, 230, 200, 0.9);
  }

  #artworkView.panel-spotlight-active .art-panel.panel-group-focus:hover .panel-caption,
  #artworkView.panel-spotlight-active .art-panel.panel-spotlight-focus:not(.panel-group-focus) .panel-caption {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Grid fallback for many items */
.artwork-grid {
  position: absolute;
  inset: var(--navbar-height) 0 var(--category-height) 0;
  overflow-y: auto;
  padding: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(180px, 28vw, 320px), 1fr));
  gap: clamp(1rem, 2.5vw, 2rem);
  align-content: start;
}

.artwork-grid::-webkit-scrollbar {
  width: 6px;
}

.artwork-grid::-webkit-scrollbar-track {
  background: transparent;
}

.artwork-grid::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.grid-item {
  position: relative;
  aspect-ratio: 3/4;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  padding: 6px;
  background: linear-gradient(145deg, #2a2520, #1a1714);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(201, 169, 110, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: transform 0.4s var(--transition-smooth), box-shadow 0.4s;
}

.grid-item:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.6),
    0 0 20px var(--accent-glow),
    0 0 0 1px var(--accent-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px;
}

.grid-item .grid-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

/* Category bar (replaces timeline) */
#categoryBar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--category-height);
  background: linear-gradient(to top, rgba(10, 10, 10, 0.98) 60%, transparent);
  pointer-events: none;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s ease, visibility 0.35s;
}

#categoryBar.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.categories-hidden .about-landing-scroll {
  padding-bottom: 2rem;
}

#categoryBar .category-wrapper {
  cursor: none;
}

.category-wrapper {
  height: 100%;
  display: flex;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0;
  pointer-events: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
  scroll-snap-type: x mandatory;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.category-wrapper.dragging,
.category-wrapper.dragging * {
  user-select: none;
  -webkit-user-select: none;
}

.category-wrapper::-webkit-scrollbar {
  display: none;
}

.category-wrapper.dragging {
  cursor: grabbing;
}

.category-list {
  display: flex;
  align-items: center;
  gap: clamp(1.4rem, 3vw, 2.6rem);
  list-style: none;
  margin: 0;
  /* Side padding so labels can sit truly centered on screen */
  padding: 0.5rem calc(50vw - 3.5rem);
  min-width: max-content;
  box-sizing: content-box;
}

.category-item {
  flex-shrink: 0;
  scroll-snap-align: center;
}

.category-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.2rem;
  border-radius: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: clamp(0.72rem, 1vw, 0.95rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  transition:
    color 0.3s,
    transform 0.3s,
    opacity 0.3s,
    text-shadow 0.3s;
  opacity: 0.42;
}

.category-btn:focus {
  outline: none;
}

.category-btn:active {
  color: var(--text-muted);
}

.category-btn::selection,
.category-name::selection {
  background: transparent;
  color: inherit;
}

.category-name {
  position: relative;
  user-select: none;
  -webkit-user-select: none;
}

.category-name::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -0.55rem;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--accent);
  transform: translateX(-50%) scale(0.4);
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  box-shadow: 0 0 14px var(--accent-glow);
}

.category-btn:hover {
  color: var(--text-primary);
  opacity: 0.72;
}

.category-btn.active {
  color: var(--accent);
  opacity: 1;
  transform: translateY(-2px) scale(1.08);
  text-shadow: 0 0 18px rgba(201, 169, 110, 0.22);
}

.category-btn.active .category-name::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

.category-count {
  font-family: var(--font-body);
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  opacity: 0.6;
}

/* Custom drag cursor on category slider */
.drag-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.88);
  border: 1px solid rgba(201, 169, 110, 0.35);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  font-family: var(--font-display);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-primary);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.2s, transform 0.08s ease-out;
}

.drag-cursor.hidden {
  opacity: 0;
  visibility: hidden;
}

.drag-cursor.dragging {
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

.drag-cursor-arrow {
  color: var(--accent);
  font-size: 0.85rem;
  line-height: 1;
}

.drag-cursor-text {
  color: var(--text-primary);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s, visibility 0.5s;
  padding: 2rem;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 2rem;
  line-height: 1;
  color: var(--text-muted);
  z-index: 10;
  transition: color 0.3s, transform 0.3s;
}

.lightbox-close:hover {
  color: var(--text-primary);
  transform: scale(1.1);
}

.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90vw;
  max-height: 90vh;
  gap: 1.5rem;
}

.lightbox.lightbox--feature .lightbox-content,
.lightbox.lightbox--poster .lightbox-content {
  max-width: min(960px, 96vw);
  max-height: 96vh;
  gap: 1rem;
}

.lightbox.lightbox--poster {
  padding: 0.6rem 0.85rem 0.9rem;
}

.lightbox.lightbox--poster .lightbox-content {
  width: 98vw;
  max-width: 98vw;
  height: auto;
  max-height: 98vh;
  gap: 1rem;
  justify-content: center;
}

.lightbox-content img {
  max-height: 75vh;
  max-width: 100%;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  transform: scale(0.9);
  opacity: 0;
  transition: transform 0.6s var(--transition-smooth), opacity 0.6s;
}

.lightbox-collage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  max-width: min(720px, 90vw);
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
}

.lightbox-collage.hidden {
  display: none;
}

.lightbox-group-logo {
  width: clamp(72px, 12vw, 110px);
  height: auto;
  max-height: none !important;
  aspect-ratio: auto;
  object-fit: contain;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.45));
  flex-shrink: 0;
}

.lightbox-emote-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  width: 100%;
}

.lightbox-emote-grid img {
  width: 100%;
  max-height: none !important;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
}

.lightbox-feature-image {
  max-height: 68vh;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.lightbox-collage--feature {
  max-width: min(920px, 94vw);
  width: min(920px, 94vw);
  gap: 0.55rem;
}

.lightbox-collage--minecraft {
  gap: 0;
}

.lightbox-collage--minecraft .lightbox-group-logo {
  position: relative;
  z-index: 2;
  margin-bottom: -1.75rem;
}

.lightbox-collage--minecraft .lightbox-feature-image {
  position: relative;
  z-index: 1;
  margin-top: -0.35rem;
}

.lightbox-collage--poster {
  width: min(1400px, 96vw) !important;
  max-width: min(1400px, 96vw) !important;
  flex: 0 1 auto;
  min-height: 0;
  gap: 0.55rem;
  justify-content: flex-start;
}

.lightbox-collage--poster .lightbox-group-logo {
  width: clamp(72px, 12vw, 110px);
}

.lightbox-content .lightbox-feature-image--poster {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: calc(98vh - 11.5rem) !important;
  min-height: 0 !important;
  object-fit: contain !important;
  margin-bottom: 0;
}

.lightbox-collage--feature:not(.lightbox-collage--poster) .lightbox-feature-image {
  max-height: min(74vh, 800px) !important;
  max-width: min(900px, 94vw);
  object-fit: contain;
}

.lightbox.lightbox--feature .lightbox-info,
.lightbox.lightbox--poster .lightbox-info {
  max-width: min(720px, 92vw);
  width: 100%;
  flex-shrink: 0;
  margin-inline: auto;
}

.lightbox.lightbox--poster .lightbox-info {
  margin-top: 0;
  padding-top: 0;
}

.lightbox.lightbox--poster .lightbox-info h2 {
  font-size: clamp(0.8rem, 1.8vw, 1.35rem);
  margin-top: 0;
  margin-bottom: 0.3rem;
  white-space: nowrap;
}

.lightbox.lightbox--poster .lightbox-info p {
  font-size: clamp(0.78rem, 1.3vw, 0.92rem);
  line-height: 1.45;
  margin-bottom: 0.45rem;
}

.lightbox.open .lightbox-content img {
  transform: scale(1);
  opacity: 1;
}

.lightbox.open .lightbox-content .lightbox-feature-image--poster {
  transform: none;
}

.lightbox-info {
  text-align: center;
  width: 100%;
  max-width: min(640px, 92vw);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s 0.2s, transform 0.5s 0.2s;
}

.lightbox.open .lightbox-info {
  opacity: 1;
  transform: translateY(0);
}

.lightbox-info h2 {
  font-family: var(--font-display);
  font-size: clamp(0.85rem, 2.1vw, 1.65rem);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  text-align: center;
  width: 100%;
  max-width: 100%;
  white-space: nowrap;
}

.lightbox-info p {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: min(540px, 100%);
  width: 100%;
  margin: 0 auto;
  line-height: 1.6;
  text-align: center;
}

.lightbox-medium {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--accent-glow);
  border-radius: 2px;
  text-align: center;
}

/* Empty state */
.empty-state {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.empty-state p {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
  :root {
    --navbar-height: 60px;
    --category-height: 100px;
  }

  .navbar-content {
    padding: 1rem;
  }

  .nav-link {
    margin-right: 0;
  }

  .attribution {
    display: none;
  }

  .category-btn {
    padding: 0.5rem 0.15rem;
    font-size: 0.6rem;
  }

  .artwork-grid {
    grid-template-columns: repeat(auto-fill, minmax(clamp(140px, 42vw, 220px), 1fr));
    gap: 1rem;
    padding: 1rem;
  }

  .lightbox {
    padding: 1rem;
  }
}
