:root { color-scheme: light; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: #202124; background: #fafaf9; }
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
.gallery-header { max-width: 1440px; margin: auto; padding: 32px 40px 30px; }
.back-link { display: inline-flex; align-items: center; gap: 7px; color: #626970; text-decoration: none; font-size: 14px; }
.back-link span { font-size: 28px; line-height: 1; }
.back-link:hover { color: #007aff; }
.heading-row { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-top: 42px; }
.eyebrow { font-size: 10px; letter-spacing: .18em; font-weight: 600; color: #898b90; margin: 0 0 8px; }
h1 { font-size: clamp(36px, 5vw, 54px); letter-spacing: -.045em; line-height: 1.1; margin: 0; font-weight: 700; }
.item-count { color: #81858b; font-size: 14px; padding-bottom: 5px; white-space: nowrap; }
.intro { color: #777d83; font-size: 15px; margin: 14px 0 0; }
main { max-width: 1440px; margin: auto; padding: 0 24px; }
.photo-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.photo { display: block; position: relative; aspect-ratio: 1; overflow: hidden; background: #e9e9e6; border-radius: 3px; cursor: zoom-in; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease, filter .35s ease; }
.photo:hover img { transform: scale(1.045); filter: brightness(1.04); }
.photo:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid #007aff; outline-offset: 3px; z-index: 1; }
.video-badge { position: absolute; bottom: 10px; left: 10px; color: #fff; font-size: 11px; padding: 5px 9px; border-radius: 20px; background: #0006; backdrop-filter: blur(12px); }
.library-footer { text-align: center; color: #979ba0; font-size: 12px; margin: 30px 0 40px; }
.viewer { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; border: 0; padding: 0; margin: 0; background: #101113; color: #f9f9fa; overflow: hidden; }
.viewer::backdrop { background: #101113; }
.viewer[open] { display: flex; flex-direction: column; }
.viewer-toolbar { height: 80px; flex: 0 0 80px; display: flex; justify-content: space-between; align-items: center; padding: 16px 30px; z-index: 2; }
#photo-name { display: block; font-size: 15px; font-weight: 500; }
#photo-position { display: block; color: #999da5; font-size: 12px; margin-top: 5px; }
.icon-button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: #ffffff14; color: white; cursor: pointer; display: grid; place-items: center; font: inherit; transition: background .2s; }
.icon-button:hover { background: #ffffff30; }
.close { font-size: 18px; }
.stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 80px; touch-action: pan-y pinch-zoom; }
.stage img, .stage video { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 2px; }
.previous, .next { position: absolute; top: calc(50% - 22px); font-size: 32px; z-index: 2; }
.previous { left: 20px; } .next { right: 20px; }
.viewer-hint { text-align: center; flex: 0 0 46px; margin: 0; padding-top: 16px; color: #777c85; font-size: 11px; }
@media (min-width: 1600px) { .photo-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 850px) { .photo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .gallery-header { padding: 22px 20px 24px; } .heading-row { margin-top: 30px; } .intro { font-size: 13px; }
  main { padding: 0 4px; } .photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; }
  .photo { border-radius: 2px; } .item-count { font-size: 12px; } .viewer-toolbar { padding: 16px 18px; }
  .stage { padding: 0 8px; } .previous, .next { top: auto; bottom: 12px; width: 36px; height: 36px; } .viewer-hint { flex-basis: 60px; padding-top: 25px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
