.photos-page { min-height: calc(100svh - 200px); padding-top: 40px; }
.photos-page h1 { font-size: 44px; text-transform: none; text-shadow: none; margin: 0 0 20px; overflow-wrap: anywhere; }
.photos-back { display: inline-block; margin-bottom: 28px; color: var(--muted); font-size: 16px; }
.album-date { color: var(--muted); margin: -4px 0 32px; font-size: 17px; }
.album-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 32px; }
.album-cover { min-width: 0; }
.album-cover > a { display: block; text-decoration: none; }
.album-cover img { width: 100%; height: auto; border: 4px solid var(--paper); }
.album-cover a:hover img { border-color: var(--brass); }
.album-cover h2 { font-size: 28px; margin: 18px 0 8px; }
.album-cover p { margin-bottom: 0; color: var(--muted); font-size: 16px; }
.album-cover .gallery-credit { margin-top: 10px; font-size: 14px; }
.album-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.album-photo { display: grid; place-items: center; min-width: 0; aspect-ratio: 3 / 2; background: #24251f; border: 3px solid var(--paper); }
.album-photo:hover { border-color: var(--brass); }
.album-photo img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
html.viewer-open { overflow: hidden; }
.photo-viewer { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; height: 100dvh; max-height: none; margin: 0; padding: 12px max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); border: 0; background: #11110f; color: var(--paper); }
.photo-viewer[open] { display: grid; grid-template-rows: 44px minmax(0, 1fr) auto; gap: 12px; }
.photo-viewer::backdrop { background: #11110f; }
.viewer-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.viewer-counter { color: var(--muted); font: 14px "Courier New", Courier, monospace; }
.photo-viewer button { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; padding: 10px; border: 0; background: transparent; color: var(--paper); }
.photo-viewer button:hover { background: #302e27; }
.viewer-stage { position: relative; display: grid; place-items: center; min-height: 0; min-width: 0; touch-action: pan-y pinch-zoom; }
.viewer-image { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.viewer-error { position: absolute; max-width: 90%; text-align: center; }
.viewer-original { color: var(--brass); }
.viewer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 60px; }
.viewer-caption { margin: 0; max-width: 760px; text-align: center; font-size: 15px; line-height: 1.4; color: var(--muted); }
@media (max-width: 820px) {
  .album-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .photos-page h1 { font-size: 34px; }
  .album-list { gap: 32px 20px; }
  .viewer-caption { font-size: 13px; }
}
@media (max-width: 600px) {
  .album-list { grid-template-columns: 1fr; }
  .photo-viewer { padding-top: max(8px, env(safe-area-inset-top)); }
}
@media (max-height: 480px) {
  .photo-viewer[open] { grid-template-rows: 44px minmax(0, 1fr) 44px; gap: 4px; }
  .viewer-bottom { min-height: 44px; }
  .viewer-caption { font-size: 12px; }
}
