
  .photo-dialog {
    width: min(960px, calc(100% - 24px));
    max-height: calc(100dvh - 24px);
    padding: 0;
    border: 1px solid #ffffff30;
    border-radius: 12px;
    background: #111827;
    color: white;
  }

  .photo-dialog::backdrop { background: rgb(9 15 26 / 85%); }

  .viewer-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    max-height: calc(100dvh - 26px);
  }

  .viewer-header,
  .viewer-controls {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
  }

  .viewer-header { justify-content: space-between; }
  .viewer-controls { justify-content: center; }

  .viewer-stage {
    display: grid;
    min-height: 0;
    place-items: center;
    background: #080e18;
  }

  .viewer-stage img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: min(75dvh, calc(100dvh - 160px));
    object-fit: contain;
  }

  .viewer-button {
    min-width: 44px;
    min-height: 44px;
    padding: 6px;
    border: 1px solid #ffffff55;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    font-size: 20px;
    cursor: pointer;
  }

  .viewer-button:hover { background: #ffffff20; }
  .viewer-button:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
  [data-viewer-position] { min-width: 90px; text-align: center; font-size: 14px; }
