.photo-viewer {
  box-sizing: border-box;
  width: max-content;
  max-width: calc(100vw - 36px);
  max-height: calc(100vh - 36px);
  margin: auto;
  padding: 15px;
  overflow: auto;
  border: 0;
  border-radius: 4px;
  background: #fff;
  color: #333;
  box-shadow: 0 10px 25px rgba(0,0,0,.5);
  text-align: center;
}
.photo-viewer::backdrop { background: rgba(0,0,0,.65); }
.photo-frame { position: relative; display: block; width: max-content; max-width: 100%; margin: auto; }
.photo-viewer .photo-large { display: block; max-width: 100%; max-height: calc(100vh - 175px); width: auto; height: auto; margin: auto; }
.photo-viewer .photo-phone[hidden] { display: none; }
.photo-viewer button { box-sizing: border-box; min-width: 44px; min-height: 44px; border: 0; border-radius: 4px; background: #333; color: white; cursor: pointer; font: 26px/1 sans-serif; }
.photo-viewer button:focus-visible, .photo-viewer a:focus-visible { outline: 3px solid #ffa600; outline-offset: 2px; }
.photo-close { display: block; margin: 0 0 8px auto; }
.photo-viewer .photo-caption { margin: 10px 0 6px; font: bold 14px/1.6 sans-serif; overflow-wrap: anywhere; }
.photo-controls { display: flex; align-items: center; justify-content: center; gap: 16px; }
.photo-count { min-width: 50px; font: 14px/1.5 sans-serif; }
@media (max-width: 480px) {
  .photo-viewer { padding: 10px; max-width: calc(100vw - 20px); }
  .photo-viewer .photo-large { max-height: calc(100vh - 200px); }
}
