img[data-image-zoom="true"] { cursor: zoom-in; }
#image-viewer {
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: #09090c;
  overflow: hidden;
}
#image-viewer[open] { display: flex; flex-direction: column; }
.image-viewer-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: max(12px, env(safe-area-inset-top)) 16px 8px;
  flex-shrink: 0;
}
.image-viewer-header h2 { font-size: 16px; margin: 0; }
.image-viewer-controls { display: flex; align-items: center; gap: 6px; }
.image-viewer-controls button { min-height: 44px; min-width: 44px; padding: 6px 10px; }
.image-viewer-info { padding: 0 16px 10px; font-size: 12px; color: var(--muted); flex-shrink: 0; }
.image-viewer-info button { margin-left: 8px; }
.image-viewer-viewport {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: none;
  cursor: grab;
  padding-bottom: env(safe-area-inset-bottom);
}
.image-viewer-viewport:active { cursor: grabbing; }
.image-viewer-canvas {
  display: grid;
  place-items: center;
  width: max-content;
  min-width: 100%;
  min-height: 100%;
  padding: 16px;
}
.image-viewer-canvas img {
  display: block;
  max-width: none;
  height: auto;
  border: none;
  user-select: none;
  -webkit-user-drag: none;
}
