.photo-modal { box-sizing: border-box; border: 0; padding: 1rem; margin: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; background: rgb(0 0 0 / .9); color: white; }
.photo-modal[open] { display: flex; align-items: center; justify-content: center; }
.photo-modal::backdrop { background: rgb(0 0 0 / .65); }
.photo-modal-content { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; max-width: 100%; }
.photo-modal img { max-width: 92vw; max-height: 80dvh; object-fit: contain; border-radius: .5rem; }
.photo-modal button { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border-radius: .5rem; background: #262626; color: white; padding: .5rem; }
.photo-modal button:hover { background: #404040; }
.photo-modal button:focus-visible, .photo-load-status button:focus-visible { outline: 2px solid white; outline-offset: 3px; }
.photo-modal-close { position: absolute; right: 1rem; top: 1rem; z-index: 2; }
.photo-modal-prev, .photo-modal-next { position: absolute; top: 50%; z-index: 2; }
.photo-modal-prev { left: .5rem; } .photo-modal-next { right: .5rem; }
.photo-modal [hidden], .photo-load-status [hidden], .photo-load-status[hidden], .photo-thumbnail-status[hidden] { display: none !important; }
.photo-load-status { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .75rem; padding: .75rem; border-radius: .5rem; background: #262626; color: white; font-size: 1rem; z-index: 1; }
#requestDetailPhotoViewer .photo-load-status { position: absolute; bottom: 1rem; }
.photo-load-status button { min-height: 44px; padding: .5rem 1rem; border: 1px solid #aaa; border-radius: .5rem; }
.photo-spinner { width: 1.25rem; height: 1.25rem; border: 2px solid #aaa; border-top-color: white; border-radius: 50%; animation: photo-spin .8s linear infinite; }
.photo-thumbnail-frame { display: inline-grid; grid-template: 1fr / 1fr; width: 100%; height: 100%; vertical-align: middle; position: relative; }
.photo-thumbnail-frame > img, .photo-thumbnail-status { grid-area: 1 / 1; }
.photo-thumbnail-frame img[data-photo-state="loading"], .photo-thumbnail-frame img[data-photo-state="error"] { visibility: hidden; }
.photo-thumbnail-status { display: flex; align-items: center; justify-content: center; min-height: 4rem; padding: .25rem; background: #f3f4f6; color: #374151; font-size: .875rem; text-align: center; white-space: normal; }
.dark .photo-thumbnail-status { background: #1f2937; color: #e5e7eb; }
@keyframes photo-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .photo-spinner { animation: none; } }

.photo-modal svg { width: 24px; height: 24px; flex: none; }
