#imagePreview {
  inset: 0; margin: 0; width: 100vw; max-width: none;
  height: 100vh; height: 100dvh; max-height: none;
  box-sizing: border-box; border: 0; border-radius: 0;
  padding: calc(68px + env(safe-area-inset-top, 0px)) 16px calc(60px + env(safe-area-inset-bottom, 0px));
  background: rgba(9, 14, 24, .96); color: white; overflow: hidden;
  cursor: zoom-out;
}
#imagePreview[open] { display: flex; align-items: center; justify-content: center; }
#imagePreview::backdrop { background: #090e18; backdrop-filter: none; }
#imagePreview .image-preview-full {
  display: block; max-width: 100%; max-height: 100%; object-fit: contain;
  width: auto; height: auto; border-radius: 0; cursor: zoom-out;
}
#imagePreview .image-preview-close {
  position: absolute; top: calc(14px + env(safe-area-inset-top, 0px));
  right: calc(16px + env(safe-area-inset-right, 0px));
  min-width: 88px; min-height: 44px; border: 1px solid #87909f;
  border-radius: 24px; background: #263142; color: white; font: 16px system-ui,sans-serif;
  cursor: pointer; z-index: 1;
}
#imagePreview .image-preview-close:focus-visible { outline: 3px solid #83b7ff; outline-offset: 3px; }
#imagePreview .image-preview-hint {
  position: absolute; bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  left: 16px; right: 16px; text-align: center; color: #d5dce7; font-size: 14px;
}
#imagePreview.image-preview-error .image-preview-full { visibility: hidden; }
