/* A contact sheet of past workshop builds. Every angle opens at its original ratio. */
.gallery-tools { padding-block: 1.5rem; border-bottom: 1px solid var(--line); }
.gallery-themes {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 clamp(.55rem, 2vw, 1.75rem);
  padding-block: .35rem;
}
.gallery-themes .filter-btn { min-width: 44px; }
.gallery-search-row {
  display: grid;
  grid-template-columns: minmax(11rem, 28rem) minmax(10rem, 16rem) auto;
  gap: 1rem;
  align-items: end;
}
.gallery-tools .tablist:not(:empty) { margin-top: 1rem; }
.archive-results { padding-block: 1.25rem clamp(3rem, 6vw, 6rem); }
.gallery-count { padding-block: 1rem; font-size: .875rem; }
.gallery-controller { min-width: 0; }
.gallery-controller .product-image { cursor: zoom-in; }
.gallery-controller .card-title { font-size: clamp(2.25rem, 3.5vw, 3.75rem); }
.gallery-controller .build-category { justify-content: space-between; margin-top: .6rem; padding-bottom: .6rem; border-bottom: 1px solid var(--line); }
.gallery-controller .card-meta { padding-block: 1rem 0; }
.gallery-angles { margin-top: 1rem; }
.gallery-angles:empty { display: none; }
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin-top: 1rem; }
.gallery-controller .card-action { padding-block: .4rem; min-height: 44px; }
.gallery-controller .card-meta > .card-action { margin-top: 1rem; }
.photo-unavailable { display: grid; place-items: center; height: 100%; color: var(--ink); }

.photo-viewer, .product-zoom-dialog {
  box-sizing: border-box;
  width: min(65rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 1rem;
}
.viewer-heading, .viewer-controls, .product-zoom-header, .product-zoom-caption, .product-zoom-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1rem;
}
.viewer-heading, .product-zoom-header { padding-bottom: 1rem; }
.viewer-heading h2, .product-zoom-header h2 { font-size: clamp(1.75rem, 3vw, 3rem); }
.viewer-image-shell {
  position: relative;
  display: grid;
  place-items: center;
  height: min(55dvh, 40rem);
  background: #14241e;
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
}
.viewer-image { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.viewer-image-message { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 1rem; pointer-events: none; }
.viewer-image-message button { pointer-events: auto; background: var(--paper); }
.viewer-image-message p:not([hidden]) { background: var(--paper); padding: .5rem 1rem; }
.viewer-controls, .viewer-thumbnails { margin-top: 1rem; }
.viewer-controls p { text-align: center; }
.viewer-thumbnails { justify-content: center; }
.viewer-help, .product-zoom-help { margin-top: .75rem; text-align: center; font-size: .875rem; }
.product-zoom-dialog { height: min(54rem, calc(100dvh - 2rem)); }
.product-zoom-dialog[open] { display: flex; flex-direction: column; }
.product-zoom-viewport { flex: 1; min-height: 5rem; overflow: auto; background: #14241e; overscroll-behavior: contain; }
.product-zoom-canvas { display: grid; place-items: center; }
.product-zoom-image { max-width: none; object-fit: contain; }
.product-zoom-caption { padding-block: .5rem; font-size: .875rem; }
.product-zoom-controls, .product-photo-pages, .product-zoom-options { flex-wrap: wrap; }
.product-photo-pages, .product-zoom-options { display: flex; align-items: center; gap: .5rem; }
.product-zoom-options output { min-width: 2.25rem; text-align: center; font-size: .875rem; }
@media (max-width: 48rem) {
  .gallery-search-row { grid-template-columns: minmax(0, 1fr) auto; }
  .gallery-search-row .field:first-child { grid-column: 1 / -1; }
  .photo-viewer, .product-zoom-dialog { width: calc(100vw - 1rem); max-height: calc(100dvh - 1rem); padding: .75rem; }
  .product-zoom-dialog { height: calc(100dvh - 1rem); }
  .viewer-image-shell { height: 43dvh; }
  .viewer-controls { gap: .5rem; }
  .viewer-controls .outline-button, .product-zoom-controls .outline-button { min-height: 44px; padding: .4rem .65rem; }
}
@media (max-height: 28rem) {
  .viewer-help, .product-zoom-help, .viewer-thumbnails { display: none; }
  .viewer-image-shell { height: 40dvh; }
  .viewer-heading, .product-zoom-header { padding-block: .4rem; }
}
