html.viewing-photo { overflow: hidden }
[data-album][id], .material-albums [id], .sample-card[id] { scroll-margin-top: 6rem }
.photo-cover { position: relative; display: block; color: inherit; text-decoration: none }
.photo-cover:focus-visible, .photo-viewer button:focus-visible, .album-link:focus-visible {
  outline: 3px solid #e0a55c; outline-offset: 3px;
}
.photo-count {
  position: absolute; right: .65rem; bottom: .65rem; z-index: 1; pointer-events: none;
  padding: .35rem .55rem; border-radius: .2rem; background: #11190fed;
  color: #fff; font: 650 .8rem/1.3 system-ui,sans-serif;
}
.album-fallback { margin: .65rem 1rem 1rem; font: .95rem/1.55 system-ui,sans-serif }
.album-fallback summary { cursor: pointer }
.album-fallback a { display: block; color: inherit; text-decoration: underline }
.album-fallback[hidden], .viewer-controls[hidden] { display: none }
.photo-viewer {
  box-sizing: border-box; width: min(960px,calc(100% - 24px));
  max-width: 100%; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px);
  padding: 0; margin: auto; overflow: auto; border: 1px solid #656250; border-radius: .5rem;
  background: #141711; color: #f3ead2; box-shadow: 0 12px 70px #0009; overscroll-behavior: contain;
}
.photo-viewer::backdrop { background: #080b08eb }
.photo-viewer .viewer-header {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  position: static; min-height: 0; padding: .65rem 1rem; background: none;
}
.photo-viewer .viewer-header h2 { margin: 0; color: #f3ead2; font: 650 clamp(1rem,2.7vw,1.35rem)/1.22 Georgia,serif; text-transform: none; letter-spacing: 0 }
.photo-viewer button {
  flex-shrink: 0; min-width: 50px; min-height: 44px; padding: .45rem .9rem;
  background: #20271b; color: #f3ead2; border: 1px solid #817555; border-radius: .3rem; cursor: pointer;
  font: 650 .9rem/1.2 system-ui,sans-serif;
}
.photo-viewer button:hover { border-color: #e0a55c }
.viewer-stage { background: #090b09; touch-action: pan-y pinch-zoom }
.photo-viewer .viewer-stage img { display: block; width: 100%; height: min(60vh,640px); height: min(60dvh,640px); object-fit: contain; margin: 0 }
.viewer-info { padding: .8rem 1rem .55rem; font: .95rem/1.4 system-ui,sans-serif }
.viewer-counter { color: #e0b67f; font-weight: 700; font-size: .8rem }
.photo-viewer .viewer-caption { margin: .2rem 0; color: #f3ead2; font: inherit }
.photo-viewer .viewer-controls { position: static; display: flex; justify-content: space-between; padding: 0 1rem .8rem; background: none }
.photo-viewer .viewer-controls[hidden] { display: none }
@media (max-height: 520px) {
  .photo-viewer .viewer-stage img { height: 43vh; height: 43dvh }
}
.sample-grid, .material-album-grid {
  display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,200px),1fr)); gap: 1rem;
}
.sample-grid { margin: 1rem 0 }
.sample-card, .material-album { min-width: 0; background: #191c14; border: 1px solid #514b37; border-radius: .25rem; overflow: hidden }
.sample-card a, .material-album a { color: #f3ead2 }
.sample-card a { display: block; text-decoration: none }
.sample-card img, .material-album img { width: 100%; aspect-ratio: 4/3; height: auto; object-fit: cover; display: block }
.sample-card strong, .material-album h3 { display: block; padding: .8rem .9rem; margin: 0; color: #f3ead2; font: 650 1.02rem/1.35 Georgia,serif }
.album-link { display: inline-flex; align-items: center; min-height: 44px; color: #e9b574; text-underline-offset: .2em; font-weight: 650 }
.material-albums { padding: clamp(2rem,6vw,5rem) 0; background: #141911; color: #f3ead2 }
.material-albums h2 { margin: 0 0 1rem }
.material-album .album-description { margin: -.2rem .9rem .9rem; color: #c9c6b6; font-size: .93rem; line-height: 1.5 }
