.mg-photo-viewer {
  position: fixed;
  inset: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  padding: max(64px, env(safe-area-inset-top)) 12px max(42px, env(safe-area-inset-bottom));
  border: 0;
  overflow: hidden;
  color: #fff;
  background: #12161b;
}
.mg-photo-viewer[open] { display: grid; place-items: center; }
.mg-photo-viewer::backdrop { background: #12161b; }
.mg-photo-viewer > img { display: block; width: 100%; height: 100%; max-height: 100%; min-height: 0; object-fit: contain; touch-action: pan-y pinch-zoom; }
.mg-photo-viewer button {
  position: absolute;
  z-index: 1;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #b94c00;
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 12px;
  min-height: 44px;
  cursor: pointer;
}
.mg-photo-viewer button:hover, .mg-photo-viewer button:focus-visible { background: #a44100; }
.mg-photo-viewer [hidden] { display: none !important; }
.mg-photo-back { top: max(10px, env(safe-area-inset-top)); left: max(10px, env(safe-area-inset-left)); gap: .65rem; padding: .55rem .85rem; }
.mg-photo-step { top: 50%; transform: translateY(-50%); width: 44px; }
.mg-photo-step.is-previous { left: max(10px, env(safe-area-inset-left)); }
.mg-photo-step.is-next { right: max(10px, env(safe-area-inset-right)); }
.mg-photo-chevron { display: inline-block; width: .6rem; height: .6rem; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); }
.mg-photo-chevron.is-left { transform: rotate(-135deg); }
.mg-photo-viewer output { pointer-events: none; position: absolute; bottom: max(12px, env(safe-area-inset-bottom)); padding: .2rem .65rem; background: #242a33; border-radius: 1rem; }
