/**
 * ============================================================================
 * FightArtMX - Dynamic Art Gallery CSS (100% Vanilla Modern CSS3)
 * Responsive Masonry + Adaptive Grid + Native <dialog> High-Res Lightbox
 * ============================================================================
 */

body.famx-gallery-page {
  background-color: #030406;
  background-image:
    radial-gradient(circle at 50% 0%, rgba(255, 107, 0, 0.11) 0%, transparent 48%),
    linear-gradient(to right, rgba(255, 255, 255, 0.016) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.016) 1px, transparent 1px);
  background-size: 100% 100%, 44px 44px, 44px 44px;
  color: #f8fafc;
}

.gallery-main {
  flex: 1;
  padding-bottom: 4.5rem;
}

/* ==========================================================================
   1. HERO HEADER
   ========================================================================== */
.gallery-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 2.5rem;
  padding-bottom: 1.75rem;
}

.gallery-hero-copy {
  max-width: 680px;
}

.gallery-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--famx-amber, #ff9e00);
  margin-bottom: 0.6rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--famx-orange, #ff6b00);
  box-shadow: 0 0 12px rgba(255, 107, 0, 0.85);
}

.gallery-title {
  font-family: 'Chakra Petch', sans-serif;
  font-size: clamp(2.1rem, 4.2vw, 3.2rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: #ffffff;
  margin-bottom: 0.65rem;
}

.gallery-subtitle {
  color: #cbd5e1;
  font-size: clamp(0.95rem, 1.3vw, 1.05rem);
  line-height: 1.65;
}

.gallery-hero-stats {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.stat-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  padding: 0.55rem 0.95rem;
  border-radius: 0.75rem;
  background: rgba(17, 21, 32, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--famx-orange, #ff6b00);
}

.stat-label {
  font-size: 0.78rem;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.nsfw-gate-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.62rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(17, 21, 32, 0.9);
  color: #e2e8f0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nsfw-gate-btn:hover {
  border-color: var(--famx-orange, #ff6b00);
  color: #ffffff;
}

.nsfw-gate-btn.is-nsfw {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.6);
  color: #fca5a5;
  box-shadow: 0 0 20px -6px rgba(239, 68, 68, 0.55);
}

.nsfw-indicator {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #10b981;
}

.nsfw-gate-btn.is-nsfw .nsfw-indicator {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.9);
}

/* ==========================================================================
   2. FILTER TOOLBAR (NON-FLOATING) & SEARCH AUTOCOMPLETE
   ========================================================================== */
.gallery-toolbar-wrap {
  position: relative;
  z-index: 40;
  background: rgba(5, 7, 11, 0.72);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.85rem 0;
  margin-bottom: 1.5rem;
}

.gallery-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.search-autocomplete-wrap {
  position: relative;
  flex: 1 1 250px;
  min-width: 210px;
}

.search-field {
  position: relative;
  display: block;
  width: 100%;
}

.search-autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 120;
  list-style: none;
  margin: 0;
  padding: 0.35rem;
  max-height: 290px;
  overflow-y: auto;
  border-radius: 0.75rem;
  background: rgba(11, 15, 24, 0.98);
  border: 1px solid rgba(255, 107, 0, 0.35);
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(14px);
}

.search-ac-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.5rem 0.7rem;
  border-radius: 0.5rem;
  color: #e2e8f0;
  font-size: 0.84rem;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}

.search-ac-item:hover,
.search-ac-item.is-active {
  background: rgba(255, 107, 0, 0.18);
  color: #ffffff;
}

.search-ac-label {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-ac-kind {
  flex-shrink: 0;
  padding: 0.15rem 0.48rem;
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.07);
  color: #94a3b8;
}

.search-ac-item[data-ac-type="character"] .search-ac-kind {
  background: rgba(255, 107, 0, 0.18);
  color: #ffb26b;
}

.search-ac-item[data-ac-type="tag"] .search-ac-kind {
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

.search-field input {
  width: 100%;
  padding: 0.58rem 0.9rem 0.58rem 2.4rem;
  border-radius: 0.65rem;
  background: rgba(15, 20, 31, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.11);
  color: #f8fafc;
  font-family: inherit;
  font-size: 0.88rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-field input:focus {
  outline: none;
  border-color: var(--famx-orange, #ff6b00);
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.18);
}

.category-pills {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  overflow-x: auto;
  scrollbar-width: none;
  max-width: 100%;
}

.category-pills::-webkit-scrollbar {
  display: none;
}

.pill-btn {
  flex-shrink: 0;
  padding: 0.48rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(17, 21, 32, 0.75);
  color: #cbd5e1;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pill-btn:hover {
  border-color: rgba(255, 107, 0, 0.55);
  color: #ffffff;
}

.pill-btn.active {
  background: linear-gradient(90deg, #ff6b00, #ff9e00);
  border-color: transparent;
  color: #000000;
  font-weight: 700;
}

.toolbar-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  flex-wrap: wrap;
}

.toolbar-select {
  padding: 0.5rem 0.75rem;
  border-radius: 0.6rem;
  background: rgba(15, 20, 31, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.11);
  color: #e2e8f0;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.toolbar-select:focus {
  outline: none;
  border-color: var(--famx-orange, #ff6b00);
}

.icon-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.48rem 0.75rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 20, 31, 0.95);
  color: #cbd5e1;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-toggle-btn[aria-pressed="true"] {
  border-color: rgba(255, 107, 0, 0.6);
  color: #ff9e00;
  background: rgba(255, 107, 0, 0.12);
}

.layout-switch {
  display: inline-flex;
  padding: 0.2rem;
  border-radius: 0.6rem;
  background: rgba(15, 20, 31, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.layout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 30px;
  border-radius: 0.45rem;
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s ease;
}

.layout-btn.active {
  background: #ff6b00;
  color: #000000;
}

.active-filters-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.65rem;
}

.active-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 107, 0, 0.16);
  border: 1px solid rgba(255, 107, 0, 0.45);
  color: #ffd7b3;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  cursor: pointer;
}

.active-chip:hover {
  background: rgba(255, 107, 0, 0.28);
}

/* Preview / Status Banner */
.mode-banner {
  margin-bottom: 1.25rem;
  padding: 0.8rem 1rem;
  border-radius: 0.85rem;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fde68a;
  font-size: 0.84rem;
  line-height: 1.5;
}

/* ==========================================================================
   3. DYNAMIC MASONRY & GRID CARDS
   ========================================================================== */
.gallery-canvas.mode-masonry {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.masonry-column {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.gallery-canvas.mode-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.art-card {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  background: #0d111a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  content-visibility: auto;
  contain-intrinsic-size: 320px 400px;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.28s ease;
}

.art-card:hover,
.art-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(255, 107, 0, 0.65);
  box-shadow: 0 20px 40px -16px rgba(0, 0, 0, 0.85), 0 0 28px -8px rgba(255, 107, 0, 0.35);
  outline: none;
}

.art-media-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #111622;
}

.gallery-canvas.mode-grid .art-media-wrap {
  aspect-ratio: 1 / 1;
}

/* Efecto de reparto de cartas en la apertura inicial de /gallery */
.gallery-canvas.is-dealing {
  perspective: 1100px;
}

.art-card.card-deal-in {
  content-visibility: visible;
  opacity: 0;
  transform-origin: center top;
  will-change: transform, opacity;
  animation: famxCardDeal 0.56s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--deal-idx, 0) * 52ms);
}

@keyframes famxCardDeal {
  0% {
    opacity: 0;
    transform: translate3d(var(--deal-x, -36px), -54px, 0) scale(0.84) rotate(var(--deal-rot, -6deg)) rotateX(12deg);
    box-shadow: 0 28px 46px -14px rgba(0, 0, 0, 0.9);
  }
  70% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1) rotate(0deg) rotateX(0deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .art-card.card-deal-in {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

.art-thumb {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), filter 0.35s ease;
}

.art-card:hover .art-thumb {
  transform: scale(1.035);
}

.art-card.nsfw-blurred .art-thumb {
  filter: blur(22px) brightness(0.65);
  transform: scale(1.08);
}

.art-blur-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: rgba(5, 7, 11, 0.32);
  color: #ffffff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  font-weight: 700;
  text-align: center;
  padding: 0.75rem;
  pointer-events: none;
}

.art-badges {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  right: 0.65rem;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  pointer-events: none;
}

.badge-pill {
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.badge-nsfw {
  background: rgba(220, 38, 38, 0.86);
  color: #ffffff;
  border: 1px solid rgba(252, 165, 165, 0.45);
}

.badge-featured {
  background: rgba(255, 107, 0, 0.9);
  color: #000000;
}

.badge-cat {
  background: rgba(9, 11, 16, 0.78);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.art-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
  background: linear-gradient(180deg, transparent 42%, rgba(3, 4, 6, 0.92) 100%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.art-card:hover .art-overlay,
.art-card:focus-visible .art-overlay {
  opacity: 1;
}

.art-card-title {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
}

.art-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: #ff9e00;
}

/* Skeleton Loader */
.gallery-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.skeleton-card {
  aspect-ratio: 1 / 1;
  border-radius: 1rem;
  background: linear-gradient(110deg, #0d121d 25%, #172033 37%, #0d121d 63%);
  background-size: 200% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
}

.skeleton-card.tall {
  aspect-ratio: 4 / 5;
}

@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* Empty State & Pagination */
.gallery-empty {
  text-align: center;
  padding: 4rem 1.25rem;
  border-radius: 1.25rem;
  background: rgba(13, 17, 26, 0.85);
  border: 1px dashed rgba(255, 255, 255, 0.14);
}

.empty-icon {
  font-size: 2.4rem;
  margin-bottom: 0.75rem;
}

.gallery-empty h2 {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 1.4rem;
  margin-bottom: 0.45rem;
}

.gallery-empty p {
  color: #94a3b8;
  margin-bottom: 1.25rem;
}

.gallery-pagination {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 2rem;
}

.scroll-sentinel {
  width: 100%;
  height: 2px;
}

.btn-orange-solid,
.btn-outline-orange,
.btn-outline-muted {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.72rem 1.35rem;
  border-radius: 0.7rem;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-orange-solid {
  border: none;
  background: linear-gradient(90deg, #ff6b00, #ff9e00);
  color: #000000;
}

.btn-orange-solid:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-outline-orange {
  background: rgba(255, 107, 0, 0.1);
  border: 1.5px solid rgba(255, 107, 0, 0.65);
  color: #ff9e00;
}

.btn-outline-orange:hover {
  background: #ff6b00;
  color: #000000;
}

.btn-outline-muted {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #cbd5e1;
}

.btn-outline-muted:hover {
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
}

/* ==========================================================================
   4. NATIVE <dialog> HIGH-RES LIGHTBOX
   ========================================================================== */
.famx-lightbox {
  width: 100vw;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: #f8fafc;
  overflow: hidden;
}

.famx-lightbox::backdrop {
  background: rgba(2, 4, 8, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.lb-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

.lb-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 1.1rem;
  background: rgba(7, 10, 16, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.lb-counter-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.lb-counter {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: #94a3b8;
}

.lb-badge-rating {
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.16);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.lb-badge-rating.is-nsfw {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.5);
}

.lb-tools {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.lb-zoom-readout {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #cbd5e1;
  min-width: 44px;
  text-align: center;
}

.lb-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.5rem;
  border-radius: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(17, 21, 32, 0.88);
  color: #e2e8f0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.lb-icon-btn:hover {
  border-color: #ff6b00;
  color: #ffffff;
}

.lb-close-btn:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(239, 68, 68, 0.6);
  color: #fca5a5;
}

.lb-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
}

.lb-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(circle at center, rgba(255, 107, 0, 0.05) 0%, transparent 65%);
  user-select: none;
  touch-action: none;
}

.lb-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 1.5rem 3.75rem;
  cursor: zoom-in;
}

.lb-viewport.is-zoomed {
  cursor: grab;
}

.lb-viewport.is-dragging {
  cursor: grabbing;
}

.lb-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.8);
  transform-origin: center center;
  transition: transform 0.18s ease, opacity 0.22s ease;
  will-change: transform;
}

.lb-viewport.is-dragging .lb-image {
  transition: none;
}

.lb-image.is-loading {
  opacity: 0.25;
}

.lb-img-shield {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.lb-spinner {
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, 0.14);
  border-top-color: #ff6b00;
  animation: spin 0.75s linear infinite;
  display: none;
  z-index: 3;
}

.lb-spinner.active {
  display: block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.lb-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 46px;
  height: 46px;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 107, 0, 0.45);
  background: rgba(7, 10, 16, 0.82);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lb-nav-arrow:hover {
  background: #ff6b00;
  color: #000000;
}

.lb-nav-arrow.prev { left: 1rem; }
.lb-nav-arrow.next { right: 1rem; }

.lb-stage-hint {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: rgba(7, 10, 16, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: #94a3b8;
  pointer-events: none;
  white-space: nowrap;
}

.lb-sidebar {
  background: rgba(9, 12, 19, 0.96);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.35rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.lb-meta-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.lb-cat-pill {
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 107, 0, 0.16);
  border: 1px solid rgba(255, 107, 0, 0.4);
  color: #ff9e00;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.lb-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  color: #94a3b8;
}

.lb-title {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 1.45rem;
  line-height: 1.2;
  color: #ffffff;
}

.lb-desc {
  color: #cbd5e1;
  font-size: 0.92rem;
  line-height: 1.65;
  white-space: pre-line;
}

.lb-specs {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #94a3b8;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.lb-chip-section h3,
.lb-links-section h3 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin-bottom: 0.5rem;
}

.lb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.lb-chip {
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.11);
  color: #e2e8f0;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.lb-chip:hover {
  border-color: #ff6b00;
  color: #ff9e00;
}

.lb-external-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.lb-ext-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.8rem;
  border-radius: 0.6rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.18s ease;
}

.lb-ext-link:hover {
  border-color: #ff6b00;
  background: rgba(255, 107, 0, 0.16);
}

/* ==========================================================================
   5. AGE GATE DIALOG
   ========================================================================== */
.famx-age-dialog {
  margin: auto;
  padding: 0;
  border: none;
  background: transparent;
  max-width: 440px;
  width: calc(100% - 2rem);
}

.famx-age-dialog::backdrop {
  background: rgba(2, 4, 8, 0.84);
  backdrop-filter: blur(12px);
}

.age-card {
  background: #0d121d;
  border: 1px solid rgba(239, 68, 68, 0.45);
  border-radius: 1.15rem;
  padding: 1.75rem;
  color: #f8fafc;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
}

.age-pill {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.age-card h2 {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 1.4rem;
  margin-bottom: 0.65rem;
}

.age-card p {
  color: #cbd5e1;
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 1.35rem;
}

.age-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
}

/* ==========================================================================
   6. RESPONSIVE BREAKPOINTS (MOBILE-FIRST TOUCH EXPERIENCE)
   ========================================================================== */
@media (max-width: 1024px) {
  .gallery-canvas.mode-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .lb-body {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(52dvh, 1fr) auto;
    overflow-y: auto;
  }

  .lb-sidebar {
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    max-height: 42dvh;
  }
}

@media (max-width: 768px) {
  .gallery-hero {
    padding-top: 1.5rem;
    padding-bottom: 1.25rem;
  }

  .gallery-toolbar-wrap {
    position: relative;
    top: 0;
  }

  .toolbar-controls {
    width: 100%;
    margin-left: 0;
  }

  .toolbar-select {
    flex: 1 1 120px;
  }

  .gallery-canvas.mode-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .gallery-canvas.mode-masonry {
    gap: 0.75rem;
  }

  .masonry-column {
    gap: 0.75rem;
  }

  .gallery-skeleton-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* En movil mostramos el titulo sutil siempre en la base */
  .art-overlay {
    opacity: 1;
    padding: 0.65rem;
    background: linear-gradient(180deg, transparent 58%, rgba(3, 4, 6, 0.88) 100%);
  }

  .art-card-title {
    font-size: 0.86rem;
  }

  .lb-viewport {
    padding: 0.75rem;
  }

  .lb-nav-arrow {
    width: 38px;
    height: 38px;
  }

  .lb-nav-arrow.prev { left: 0.45rem; }
  .lb-nav-arrow.next { right: 0.45rem; }

  .lb-stage-hint {
    display: none;
  }

  .lb-zoom-readout {
    display: none;
  }
}
