.dialog-media figure { position: relative; }
.image-expand,
.image-viewer-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: #fff;
  background: rgba(0, 0, 0, .75);
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 50%;
  cursor: pointer;
}
.image-expand { position: absolute; right: 12px; bottom: 12px; }
.image-expand svg,
.image-viewer-close svg { width: 20px; height: 20px; }
.image-expand:hover,
.image-viewer-close:hover { color: #ff5a14; border-color: #ff5a14; }
.image-expand:focus-visible,
.image-viewer-close:focus-visible { outline: 2px solid #ff5a14; outline-offset: 4px; }
.image-viewer {
  position: fixed;
  inset: 0;
  margin: 0;
  padding: 64px 16px 16px;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  height: 100%;
  height: 100dvh;
  max-height: none;
  border: 0;
  background: #080808;
}
.image-viewer[open] { display: flex; align-items: center; justify-content: center; }
.image-viewer::backdrop { background: #080808; }
.image-viewer > img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}
.image-viewer-close {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
}
