#main img.presentation-photo-trigger {
  cursor: zoom-in;
}

#main img.presentation-photo-trigger:focus-visible {
  outline: 3px solid #783b8d;
  outline-offset: -4px;
}

.presentation-photo-dialog {
  width: min(1100px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  color: #31213a;
  background: #fff;
  border: 1px solid #ded3e4;
  border-radius: 14px;
  box-shadow: 0 16px 48px #20102755;
}

.presentation-photo-dialog::backdrop {
  background: #211328cc;
}

.presentation-photo-dialog .presentation-photo-window {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.presentation-photo-dialog .presentation-photo-header {
  position: sticky;
  z-index: 1;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fff;
}

.presentation-photo-dialog #presentation-photo-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
}

.presentation-photo-dialog .presentation-photo-close {
  min-height: 44px;
  padding: 8px 14px;
  color: #fff;
  background: #633077;
  border: 1px solid #633077;
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.presentation-photo-dialog .presentation-photo-close:focus-visible {
  outline: 3px solid #432450;
  outline-offset: 2px;
}

.presentation-photo-dialog .presentation-photo-stage img {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 180px);
  max-height: calc(100dvh - 180px);
  object-fit: contain;
  object-position: center;
  background: #f8f5fa;
}

.presentation-photo-dialog p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.presentation-photo-dialog [hidden] {
  display: none;
}

@media screen and (max-width: 600px) {
  .presentation-photo-dialog {
    width: calc(100% - 16px);
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
  }
}

@media print {
  .presentation-photo-dialog {
    display: none !important;
  }
}
