.gallery-expand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: inherit;
  font-weight: 600;
  text-underline-offset: 3px;
}
.gallery-viewer {
  box-sizing: border-box;
  width: min(1100px, calc(100vw - 24px));
  max-width: 100%;
  max-height: 94dvh;
  margin: auto;
  padding: 12px;
  background: #292d31;
  color: #f2eee7;
  border: 1px solid #777b80;
  border-radius: 8px;
}
.gallery-viewer::backdrop { background: rgba(10, 12, 14, .87); }
html:has(.gallery-viewer[open]) { overflow: hidden; scrollbar-gutter: stable; }
.gallery-viewer-tools { display: flex; justify-content: flex-end; gap: 12px; margin-bottom: 8px; }
.gallery-viewer-tools button {
  min-height: 44px; padding: 0 14px; color: inherit; background: #1c1f22;
  border: 1px solid #777b80; border-radius: 4px; font: inherit; cursor: pointer;
}
.gallery-viewer-tools button[aria-pressed="true"] { border-color: #c7ad86; }
.gallery-viewer-frame { overflow: auto; max-height: 70vh; max-height: 70dvh; background: #1c1f22; }
.gallery-viewer-frame img { display: block; width: 100%; height: 70vh; height: 70dvh; object-fit: contain; }
.gallery-viewer-frame.actual-size img { width: auto; height: auto; max-width: none; margin-inline: auto; }
.gallery-viewer :focus-visible, .gallery-expand:focus-visible { outline: 2px solid #c7ad86; outline-offset: 2px; }
.gallery-viewer p { margin: 8px 0 0; }
