/* Chat-194: 16-card gallery pagination. The Museum Ledger theme remains the
   visual authority; this layer supplies its structural base and compact gaps. */
body[data-gallery-pagination="16-compact-v001"] .gallery-pagination {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto minmax(150px, 1fr);
  align-items: center;
  gap: 14px;
  width: min(760px, 100%);
  margin: 34px auto 10px;
  padding: 12px;
  border: 1px solid rgba(184, 151, 94, .6);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 236, 191, .055), transparent 38%),
    linear-gradient(135deg, rgba(13, 17, 23, .98), rgba(20, 26, 33, .98));
  box-shadow: inset 0 1px rgba(255, 240, 202, .08), 0 12px 30px rgba(0, 0, 0, .3);
}

body[data-gallery-pagination="16-compact-v001"] .gallery-pagination[hidden] {
  display: none !important;
}

body[data-gallery-pagination="16-compact-v001"] .gallery-page-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 44px;
  min-height: 44px;
  max-width: 100%;
  padding: 9px 16px;
  border: 1px solid #8f7447;
  border-radius: 8px;
  background: linear-gradient(180deg, #2a241b, #151719);
  color: #e9cf93;
  box-shadow: inset 0 1px rgba(255, 239, 197, .12), 0 4px 12px rgba(0, 0, 0, .28);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

body[data-gallery-pagination="16-compact-v001"] #galleryPrevious { justify-self: start; }
body[data-gallery-pagination="16-compact-v001"] #galleryNext { justify-self: end; }

body[data-gallery-pagination="16-compact-v001"] .gallery-page-button:not(:disabled):hover {
  border-color: #e3c887;
  background: linear-gradient(180deg, #3a3022, #1b1b1b);
  color: #fff0c4;
}

body[data-gallery-pagination="16-compact-v001"] .gallery-page-button:focus-visible,
body[data-gallery-pagination="16-compact-v001"] #museumCollectionTitle:focus-visible {
  outline: 3px solid #8fdee4;
  outline-offset: 3px;
}

body[data-gallery-pagination="16-compact-v001"] .gallery-page-button:disabled {
  cursor: not-allowed;
  opacity: .38;
  filter: saturate(.35);
}

body[data-gallery-pagination="16-compact-v001"] .gallery-page-arrow {
  color: #f2d99d;
  font-size: 21px;
  line-height: 1;
}

body[data-gallery-pagination="16-compact-v001"] .gallery-page-status {
  min-width: min(280px, 42vw);
  color: #d8c9a8;
  font: 700 13px/1.35 Georgia, "Times New Roman", serif;
  letter-spacing: .035em;
  text-align: center;
}

body[data-gallery-pagination="16-compact-v001"] .gallery-page-ellipsis {
  width: 22px;
  height: 26px;
  display: grid;
  place-items: center;
  color: #776b58;
  font: 700 14px/1 Georgia, "Times New Roman", serif;
  user-select: none;
}

@media (max-width: 620px) {
  body[data-gallery-pagination="16-compact-v001"] .gallery-pagination {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }

  body[data-gallery-pagination="16-compact-v001"] .gallery-page-status {
    grid-column: 1 / -1;
    grid-row: 1;
    min-width: 0;
    padding: 3px 4px 5px;
  }

  body[data-gallery-pagination="16-compact-v001"] #galleryPrevious,
  body[data-gallery-pagination="16-compact-v001"] #galleryNext {
    grid-row: 2;
    width: 100%;
  }
}

@media (max-width: 390px) {
  body[data-gallery-pagination="16-compact-v001"] .gallery-page-button {
    padding-inline: 10px;
    font-size: 11px;
    letter-spacing: .035em;
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-gallery-pagination="16-compact-v001"] { scroll-behavior: auto; }
  body[data-gallery-pagination="16-compact-v001"] .gallery-page-button { transition: none; }
}

@media (forced-colors: active) {
  body[data-gallery-pagination="16-compact-v001"] .gallery-pagination,
  body[data-gallery-pagination="16-compact-v001"] .gallery-page-button {
    border: 1px solid CanvasText;
    background: Canvas;
    color: CanvasText;
    box-shadow: none;
    forced-color-adjust: auto;
  }

  body[data-gallery-pagination="16-compact-v001"] .gallery-page-arrow,
  body[data-gallery-pagination="16-compact-v001"] .gallery-page-status,
  body[data-gallery-pagination="16-compact-v001"] .gallery-page-ellipsis { color: CanvasText; }

  body[data-gallery-pagination="16-compact-v001"] .gallery-page-button:focus-visible,
  body[data-gallery-pagination="16-compact-v001"] #museumCollectionTitle:focus-visible { outline-color: Highlight; }
}
