html:has(.album-page) { background: var(--ivory); }
.album-page { background: var(--ivory); color: var(--wine); }
.album { max-width: 740px; margin: 0 auto; padding: calc(20px + env(safe-area-inset-top, 0px)) 20px calc(130px + env(safe-area-inset-bottom, 0px)); }
.album__grid { columns: 2; column-gap: 10px; }
.album__photo { display: block; break-inside: avoid; margin-bottom: 10px; overflow: hidden; background: #e7dfd4; border-radius: 3px; cursor: zoom-in; }
.album__photo img { display: block; width: 100%; height: auto; transition: opacity .2s; }
.album__photo:focus-visible { outline: 3px solid var(--wine); outline-offset: 4px; }
@media (hover: hover) { .album__photo:hover img { opacity: .9; } }
.album__signature { margin: 56px 0 0; text-align: center; font: 400 15px/1.5 var(--serif); letter-spacing: .18em; }
.photo-viewer { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; color: #fffaf1; background: #1c1718; }
.photo-viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.photo-viewer::backdrop { background: #1c1718; }
.photo-viewer__top, .photo-viewer__bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.photo-viewer__top { padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 8px; }
.photo-viewer__top p { font: 400 14px/1.5 var(--sans); letter-spacing: .08em; }
.photo-viewer__stage { min-height: 0; display: flex; align-items: center; justify-content: center; touch-action: pan-y pinch-zoom; }
.photo-viewer__stage img { display: block; width: 100%; height: 100%; object-fit: contain; }
.photo-viewer__bottom { padding: 12px 12px calc(14px + env(safe-area-inset-bottom, 0px)); }
.photo-viewer__bottom p { max-width: 500px; text-align: center; font: 400 13px/1.6 var(--sans); letter-spacing: -.02em; word-break: keep-all; }
.photo-viewer__button { flex: 0 0 48px; display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid #5c5154; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.photo-viewer__button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.photo-viewer__button:focus-visible { outline: 2px solid white; outline-offset: 3px; }
@media (min-width: 760px) { .album { padding-top: 32px; } .album__grid { columns: 3; column-gap: 12px; } .album__photo { margin-bottom: 12px; } }
@media (prefers-reduced-motion: reduce) { .album__photo img { transition: none; } }
