
@import url('https://fonts.googleapis.com/css2?family=Public+Sans:ital,wght@0,100..900;1,100..900&display=swap');

body {
  font: normal 15px/1.5 'Public Sans', sans-serif;
  margin: 0;
  padding: 5px 40px 30px;
  background: #f8f8f8;
}

.main {
  padding: 20px 15%;
}

code {
  background: #ddd;
}

input, button, select {
  font: inherit;
}

a {
  color: inherit;
}


#lid {
  transform: perspective(600px) rotateX(-70deg) scaleY(8);
  margin: 10px auto 0;
  background: #666;
  width: 544px;
  color: #fff;
  position: relative;
  letter-spacing: 1px;
  top: 21px;
  height: 25px;
}

/*
h1 {
  transform: perspective(600px) rotateX(70deg) scaleY(2);
  font-size: 66px;
  font-weight: 800;
  text-transform: uppercase;
  text-align: center;
  background: #888;
  width: 542px;
  color: #fff;
  position: relative;
  top: 9px;
  letter-spacing: 1px;
  margin: 10px auto 0;
}

h1 .scan-word {
  color: #ff0;
}

h1 img {
  transform: perspective(400px) rotatex(12deg);
  display: block;
  margin: 0 auto 4px;
}
*/
@keyframes wipe-in {
  from {
    clip-path: inset(0 0 100% 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

h1 {
  width: 590px;
  margin: 15px auto 0;
  transform: perspective(400px) rotatex(25deg);
  border: 1px solid #aaa;
  padding: 28px 0 30px;
  position: relative;
  top: 2px;
  background: #fff;
}

h1 img {
  display: block;
  margin: 0 auto;
  animation: 1.5s linear .15s wipe-in both;
}

h1 img.semi {
  position: absolute;
  left: 0;
  right: 0;
  top: 30px;
  opacity: .15;
  animation: none;
}

.main h1 {
  font-size: 30px;
  margin-bottom: 50px;
}

.main h2 {
  font-size: 20px;
  margin: 30px 0 15px;
}

.abstract {
  width: 613px;
  margin: 30px auto;
}

blockquote {
  border-left: 3px solid #ccc;
  padding-left: 20px;
  margin-left: 0px;
}

select {
  width: 200px;
}

.spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid #ccc;
  border-top-color: #333;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 4px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.printer {
  width: 593px;
  margin: 0 auto;
  background: #aaa;
  color: #fff;
  font-weight: bold;
  padding: 10px 20px;
  text-align: right;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  border-top: 2px solid #000;
}

span.connect, span.connected {
  display: inline-block;
  border: 4px solid #ff0;
  border-radius: 5px;
  margin-left: 5px;
}

span.connected {
  border-color: #ddd;
}

.driver-row {
  margin: 8px auto;
  width: fit-content;
}

.loading-indicator {
  margin: 20px 0;
  text-align: center;
  font-style: italic;
}

.loading-indicator button {
  margin-left: 5px;
}

.driver-loading {
  margin-left: 8px;
}

.opt-label {
  text-align: right;
}

.opt-checkbox {
  justify-self: start;
}

.opt-number {
  width: 80px;
}

.opt-slider {
  vertical-align: middle;
  width: 200px;
}

.opt-array {
  width: 160px;
  font-family: monospace;
}

.opt-hint {
  text-wrap: nowrap;
  margin-left: 6px;
  color: #888;
}

.paper-dims {
  margin-left: 8px;
  color: #888;
}

.options-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 50% 1fr;
  gap: 6px 12px;
  align-items: baseline;
}

input[type=checkbox] {
  margin: 0;
  top: 2px;
  position: relative;
}

.toggle {
  cursor: pointer;
  user-select: none;
}

.opt-group-heading {
  grid-column: 2 / -1;
  margin: 10px 0 5px;
  font-weight: bold;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #666;
}

.advanced-toggle {
  font-style: italic;
  margin-top: 10px;
  grid-column: 1 / -1;
  text-align: center;
}

.dropzone {
  width: 563px;
  border: 3px dashed #ccc;
  border-radius: 10px;
  padding: 32px;
  text-align: center;
  cursor: pointer;
  margin: 20px auto 10px;
  transition: border-color 0.15s;
  background: #fff;
}

.dropzone.dragging {
  border-color: #333;
}

.supplies-outer {
  mix-blend-mode: multiply;
  background: #4ff;
  width: 630px;
  margin: 0 auto;
  transform: rotate(1deg);
}

.supplies {
  display: block;
  position: relative;
  mix-blend-mode: multiply;
  transform: rotate(-2deg);
  margin: 25px auto;
  width: 600px;
  background: #ff4;
  padding: 15px 15px;
  color: #000;
  text-decoration: none;
  text-align: center;
}

.supplies b {
  display: inline-block;
  padding: 0 1ex;
  background: #000;
  color: #fff;
}

.debug-toggle {
  opacity: .25;
  text-align: center;
  margin: 20px 0;
}

#debug {
  text-align: center;
}

.queue-item {
  display: inline-block;
  margin: 8px;
  vertical-align: top;
  text-align: center;
  max-width: 150px;
}

.thumb-container {
  overflow: hidden;
  margin: 0 auto 6px;
  background: #fff;
  border: 1px solid #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-icon-wrapper, .image-scale {
  margin-bottom: 6px;
}

.file-icon {
  font-size: 100px;
  line-height: 1;
}

.file-name {
  font-size: 11px;
  word-break: break-all;
}

.file-size {
  font-size: 11px;
  color: #888;
  margin-bottom: 6px;
}

.low-res {
  background: #ff4;
  color: #000;
}

#screen_container {
  background: #000;
  font-family: monospace;
  text-align: left;
}

.preview-wrapper {
  width: 633px;
  margin: 10px auto;
  height: 0;
  overflow: hidden;
  position: relative;
}

.crop-frame {
  position: absolute;
  box-sizing: border-box;
  border: 1px dashed #fff;
  outline: 1px dashed #000;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.4);
  cursor: move;
  touch-action: none;
}

.crop-handle {
  position: absolute;
  width: 11px;
  height: 11px;
  background: #fff;
  border: 1px solid #000;
  box-sizing: border-box;
  touch-action: none;
}

.crop-handle-tl { top: 0; left: 0; cursor: nwse-resize; }
.crop-handle-tr { top: 0; right: 0; cursor: nesw-resize; }
.crop-handle-bl { bottom: 0; left: 0; cursor: nesw-resize; }
.crop-handle-br { bottom: 0; right: 0; cursor: nwse-resize; }
.crop-handle-t  { top: 0; left: 50%; transform: translateX(-50%); cursor: ns-resize; }
.crop-handle-b  { bottom: 0; left: 50%; transform: translateX(-50%); cursor: ns-resize; }
.crop-handle-l  { left: 0; top: 50%; transform: translateY(-50%); cursor: ew-resize; }
.crop-handle-r  { right: 0; top: 50%; transform: translateY(-50%); cursor: ew-resize; }

.preview-canvas {
  width: 633px;
  display: block;
}

.scan-buttons {
  text-align: center;
  margin: 20px auto;
}

.scan-buttons button {
  font-size: 150%;
  padding: 5px 15px;
}

.options {
  margin: 20px auto;
  width: 633px;
}

.zadig {
  width: 573px;
  padding: 1px 20px;
  background: #cfa;
}
.zadig p {
  margin: 8px 0;
}

.feedback {
  width: 593px;
  text-align: center;
  margin: 20px auto;
}
.thumb {
  text-decoration: none;
  font-size: 28px;
  display: inline-block;
  position: relative;
}
.thumb.down {
  top: 9px;
}

.feedback-form textarea, .feedback-form input {
  display: block;
  width: 100%;
  margin: 10px 0;
}

.footer {
  width: 633px;
  margin: 15px auto;
  padding-top: 15px;
  border-top: 1px solid #ccc;
  text-align: center;
}

.crosspromo {
  display: block;
  text-decoration: none;
  text-align: center;
  background: #aaf;
  color: #fff;
  font-weight: bold;
  padding: 5px;
}