.project-image-viewer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 80px 24px 32px;
  border: 0;
  background: rgba(18, 23, 30, .94);
  overflow: hidden;
}
.project-image-viewer[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-image-viewer::backdrop { background: rgba(18, 23, 30, .94); }
.project-image-viewer img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: white;
}
.project-image-viewer-close {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 50%;
  background: #242b32;
  color: white;
  cursor: pointer;
}
.project-image-viewer-close:hover { background: #424c58; }
.project-image-viewer-close:focus-visible { outline: 3px solid white; outline-offset: 4px; }
.project-image-viewer-close svg { width: 24px; height: 24px; }
@media (max-width: 640px) {
  .project-image-viewer { padding: 80px 12px 24px; }
}
@media print { .project-image-viewer { display: none !important; } }

.project-image-viewer-frame { display: contents; }
/* Show only the original QR pixels and a white quiet zone. */
.project-image-viewer-wechat .project-image-viewer-frame {
  display: block;
  position: relative;
  width: min(600px, 100%, calc(100dvh - 112px));
  aspect-ratio: 1;
  overflow: hidden;
  background: white;
}
.project-image-viewer-wechat img {
  position: absolute;
  width: 137.037037%;
  max-width: none;
  max-height: none;
  top: -44.444444%;
  left: -18.518519%;
}
