.photo-open {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
    -webkit-touch-callout: none;
}

.photo-open canvas,
.photo-open img,
.photo-open-label {
    pointer-events: none;
}

.photo-open-label {
    position: absolute;
    right: 8px;
    bottom: 8px;
    padding: 6px 9px;
    border-radius: 3px;
    background: #0b252e;
    color: #f3f1eb;
    font: 600 0.75rem/1.2 system-ui, sans-serif;
}

.photo-open:focus-visible {
    outline: 3px solid #3b6798;
    outline-offset: -3px;
}

.photo-viewer {
    box-sizing: border-box;
    width: 54rem;
    max-width: calc(100% - 1rem);
    max-height: calc(100% - 1rem);
    margin: auto;
    padding: 8px clamp(8px, 2vw, 20px) clamp(8px, 2vw, 20px);
    overflow: auto;
    overscroll-behavior: contain;
    border: 0;
    border-radius: 8px;
    background: #0b252e;
    color: #f3f1eb;
}

.photo-viewer::backdrop {
    background: rgba(4, 17, 22, 0.88);
}

.photo-viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.photo-viewer-header h2 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.photo-viewer-close {
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: inherit;
    font: 1.5rem/1 sans-serif;
    cursor: pointer;
}

.photo-viewer-close:hover {
    background: rgba(255, 255, 255, 0.16);
}

.photo-viewer-close:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.photo-viewer-image > :not([hidden]) {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 7rem);
    max-height: calc(100dvh - 7rem);
    margin: 0 auto;
    object-fit: contain;
    -webkit-touch-callout: none;
}

.photo-viewer-status {
    margin: clamp(18px, 7vh, 64px) 0;
    color: #bdcbd0;
    text-align: center;
}
