@media screen and (min-width: 450px)  {
  #app { width: 420px; }
}
body {
  font-family: monospace;
  margin: 0;
  display: flex;
  justify-content: center;
  overflow: hidden;
  color: #fff;
  background: #222;
}
#diag {
  z-index: 9;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
  width: 90%;
  display: flex;
  justify-content: center;
  position: absolute;
  top: 8px;
  color: #333;
  background-color: #fff;
  padding: 8px;
  border-radius: 4px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, .2);
}
#diag.active {
  opacity: 1;
  visibility: visible;
}
#app {
  position: relative;
  height: 100vh;
}
#preview { width: 100%; }
#capture { width: 100%; position: absolute; top: 0 }
#scanner { background-color: #000; }
#overlay {
  display: none;
  justify-content: center;
  position: fixed;
  top: 0;
  background-color: rgba(0, 0, 0, .75);
  height: 100vh;
  width: 100%;
  padding: 16px 8px;
}
#overlay.active {
  display: flex;
}
#loading {
  display: none;
  width: 100vw;
  height: 100vh;
  justify-content: center;
  align-items: center;
}
#loading.active {
  display: flex;
}
#modal {
  display: none;
  flex-direction: column;
  height: 84vh;
  width: 90%;
  color: #333;
  background-color: #fff;
  padding: 8px;
  border-radius: 4px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, .2);
}
#modal.active {
  display: flex;
}
#close {
  padding: 10px;
  background-color: rgba(255, 255, 255, .5);
  border: #333 solid 1px;
  border-radius: 4px;
  line-height: 1.2;
  font-size: 14px;
}
#address {
  padding: 8px 4px;
  font-weight: bold;
  transform: scaleY(1.1);
  word-wrap: break-word;
}
#mosaics {
  flex-grow: 1;
  flex-basis: 0;
  overflow-y: scroll;
  padding: 4px;
}
#mosaics > dl {
  margin: 0;
  padding: 8px 0;
}
#mosaics > dl > dt {
  padding-top: 4px;
  padding-left: 4px;
  font-size: 125%;
}
#mosaics > dl > dt.image {
  height: 0;
  border-radius: 4px;
  background-size: cover;
  background-position: center;
}
#mosaics > dl > dd {
  padding-bottom: 4px;
  padding-right: 4px;
  margin-left: 0;
  font-size: 150%;
  font-weight: bold;
  text-align: right;
  border-bottom: 1px solid #222;
}
