/* Detail-only viewer tokens; PhotoSwipe manages transforms inside the Grid stage. */
.artwork-photo-link { position: relative; }
.artwork-expand { position: absolute; right: 14px; bottom: 14px; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #171613e6; color: #f5f1e8; border: 1px solid #ffffff50; }
.artwork-photo-link:hover .artwork-expand { background: #171613; }
.art-viewer {
  --av-control: 44px; --av-gap: 8px; --av-gutter: 28px;
  --av-top: 64px; --av-bottom: 112px; --av-rail: 56px;
  --av-bg: #11110f; --av-ink: #f5f1e8; --av-muted: #bcb9b0; --av-line: #45443e;
  position: fixed; inset: 0; width: 100vw; max-width: none; height: 100vh; height: 100dvh;
  max-height: none; margin: 0; border: 0; color: var(--av-ink); background: var(--av-bg);
  padding: calc(var(--av-gutter) + env(safe-area-inset-top, 0px)) calc(var(--av-gutter) + env(safe-area-inset-right, 0px)) calc(var(--av-gutter) + env(safe-area-inset-bottom, 0px)) calc(var(--av-gutter) + env(safe-area-inset-left, 0px));
  font-family: Inter, sans-serif; box-sizing: border-box; overflow: hidden; overscroll-behavior: contain;
}
.art-viewer::backdrop { background: #11110f; }
.art-viewer[open] { display: grid; grid-template-rows: var(--av-top) minmax(0, 1fr) var(--av-bottom); gap: var(--av-gap); }
.art-viewer[data-single] { --av-bottom: 44px; }
.art-viewer [hidden] { display: none !important; }
.av-header { display: flex; align-items: center; justify-content: space-between; gap: var(--av-gap); min-width: 0; }
.av-heading { min-width: 0; }
.av-title, .av-author { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 0; font-size: 14px; line-height: 1.5; font-weight: 500; }
.av-author { font-size: 12px; font-weight: 400; color: var(--av-muted); }
.av-tools, .av-zoom { display: flex; align-items: center; gap: var(--av-gap); flex-shrink: 0; }
.av-tools { gap: 16px; }
.art-viewer button { display: inline-grid; place-items: center; flex-shrink: 0; width: var(--av-control); height: var(--av-control); padding: 0; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--av-ink); cursor: pointer; font: inherit; font-size: 13px; touch-action: manipulation; }
.art-viewer button:hover:not(:disabled) { border-color: var(--av-line); background: #ffffff09; }
.art-viewer button:disabled { opacity: .35; cursor: default; }
.art-viewer :focus-visible { outline: 2px solid #e2bd72; outline-offset: 2px; }
.av-middle { display: grid; grid-template-columns: var(--av-rail) minmax(0, 1fr) var(--av-rail); align-items: center; min-height: 0; min-width: 0; gap: var(--av-gap); }
.art-viewer[data-single] .av-middle { grid-template-columns: minmax(0,1fr); }
.av-stage { position: relative; height: 100%; width: 100%; min-width: 0; min-height: 0; overflow: hidden; touch-action: none; }
.av-stage .pswp { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; --pswp-bg: var(--av-bg); }
.av-stage .pswp__top-bar { display: none; }
.av-stage .pswp__error-msg { color: var(--av-ink); font: 14px/1.6 Inter, sans-serif; text-align: center; padding: 20px; }
.av-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: scale-down; pointer-events: none; }
.av-footer { min-width: 0; min-height: 0; display: grid; grid-template-rows: 44px minmax(0,1fr); align-items: center; gap: var(--av-gap); }
.art-viewer[data-single] .av-footer { grid-template-rows: 1fr; }
.av-navigation { display: flex; justify-content: center; align-items: center; min-width: 0; gap: var(--av-gap); }
.av-thumbnails { position: relative; display: flex; align-items: center; gap: var(--av-gap); overflow-x: auto; overflow-y: hidden; min-width: 0; max-width: calc(var(--av-control) * 3 + var(--av-gap) * 2); scrollbar-width: thin; scrollbar-color: var(--av-line) transparent; }
.av-thumbnails button { border-color: var(--av-line); overflow: hidden; }
.av-thumbnails button[aria-current] { border-color: #e2bd72; }
.av-thumbnails img { width: 100%; height: 100%; object-fit: contain; }
.av-caption { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; min-width: 0; gap: 16px; color: var(--av-muted); font-size: 12px; line-height: 1.5; }
.av-count { flex-shrink: 0; padding-top: 2px; }
.av-credit { min-width: 0; max-width: 85ch; max-height: 3em; overflow-y: auto; overflow-wrap: anywhere; padding: 2px 4px; margin: 0; }
.av-mobile-arrow { display: none !important; }
.av-status { position: absolute; inset: auto 0 12px; pointer-events: none; text-align: center; color: var(--av-muted); background: var(--av-bg); font-size: 12px; padding: 4px; }
@media (max-width: 767px) {
  .art-viewer { --av-gutter: 16px; --av-top: 56px; --av-bottom: 96px; }
  .av-middle { grid-template-columns: minmax(0,1fr); }
  .av-desktop-arrow { display: none !important; }
  .av-mobile-arrow { display: inline-grid !important; }
  .av-tools, .av-zoom { gap: 0; }
  .av-tools { gap: 4px; }
  .av-thumbnails { flex: 1; }
  .av-caption { gap: 8px; }
}
@media (max-height: 500px) {
  .art-viewer { --av-top: 44px; --av-bottom: 92px; --av-gap: 4px; }
  .av-credit { max-height: 1.5em; }
  .av-author { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .art-viewer *, .art-viewer *::before, .art-viewer *::after { animation-duration: 0s !important; transition-duration: 0s !important; scroll-behavior: auto !important; }
}

.av-unavailable { display: grid; place-items: center; height: 100%; padding: 24px; color: var(--av-ink); font-size: 14px; line-height: 1.6; text-align: center; }

.art-viewer[data-single] .av-caption { grid-template-columns: minmax(0,1fr) auto; }
.av-inquire { grid-column: -2 / -1; display: inline-flex; align-items: center; justify-content: center; justify-self: end; min-height: 44px; padding: 0 14px; border: 1px solid var(--av-line); border-radius: 4px; color: var(--av-ink); font-size: 13px; text-decoration: none; white-space: nowrap; }
.av-inquire:hover { color: var(--av-ink); border-color: #bcb9b0; background: #ffffff09; }
/* Override the library's generic zoom-out cursor; dragging remains distinct. */
.art-viewer .av-stage .pswp .pswp__img { cursor: default; }
.art-viewer .av-stage .pswp--zoom-allowed .pswp__img { cursor: zoom-in; }
.art-viewer .av-stage .pswp--zoomed-in .pswp__img { cursor: grab; }
.art-viewer .av-stage .pswp--zoomed-in .pswp__img:active { cursor: grabbing; }

/* Outside the scrolling strip: no clipping, layout shift or native title duplicate. */
.av-thumbnail-tooltip { position: fixed; z-index: 2; pointer-events: none; max-width: calc(100vw - 16px); padding: 6px 10px; border: 1px solid var(--av-line); border-radius: 4px; background: #23231f; color: var(--av-ink); font-size: 12px; line-height: 1.4; white-space: nowrap; }
