#original-viewer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
  background: var(--paper, #eeeeec);
  color: var(--ink, #292b2a);
}

#original-viewer[open] { display: block; }
#original-viewer::backdrop { background: var(--paper, #eeeeec); }

.original-viewer-surface {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}

.original-viewer-surface.is-dragging { cursor: grabbing; }
.original-viewer-surface:focus-visible { outline-offset: -2px; }

.original-viewer-image {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  max-width: none;
  max-height: none;
  margin: 0;
  transform-origin: 0 0;
  will-change: transform;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

#original-viewer > .signature-button {
  position: absolute;
  z-index: 2;
  top: calc(12px + env(safe-area-inset-top, 0px));
  right: calc(12px + env(safe-area-inset-right, 0px));
  left: auto;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  color: #26302a;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  opacity: 1;
  touch-action: manipulation;
}

#original-viewer > .signature-button .signature-mark {
  width: 48px;
  height: 48px;
}

#original-viewer[data-focus-mode="pointer"] > .signature-button:focus,
#original-viewer[data-focus-mode="pointer"] > .original-viewer-surface:focus {
  outline: none;
}

#original-viewer[data-focus-mode="keyboard"] > .signature-button:focus {
  outline: 1.5px solid #394b40;
  outline-offset: 4px;
}

#original-viewer[data-focus-mode="keyboard"] > .original-viewer-surface:focus {
  outline: 1.5px solid #394b40;
  outline-offset: -3px;
}

.original-viewer-instructions {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
