/*******************************/
/* global document body styles */
/*******************************/

body {

  background-color: #faf3f0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%23a6a09d' fill-opacity='0.3'%3E%3Cpath opacity='.5' d='M96 95h4v1h-4v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9zm-1 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9z'/%3E%3Cpath d='M6 5V0H5v5H0v1h5v94h1V6h94V5H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/**************************/
/* unique id-based styles */
/**************************/

#breakout {
  position: relative;
}

#canvas {
  -webkit-transform: translateZ(0); /* force hardware acceleration in chrome */
  background: url(images/stih.png);
}

#levels {
     position: absolute;
         left: 10px;
          top: 10px;
        color: #666;
  line-height: 20px;
}

#levels #next  { position: absolute;            }
#levels #prev  { position: absolute; top: 14px; }
#levels #label { padding-left: 20px; }
#levels #level { font-size: 14pt; padding-left: 5px; font-weight: bold; color: black; }

#levels img                 { cursor: pointer; }
#levels img.disabled        { opacity: 0.3; cursor: default; }
#levels img:active          { margin-top: 1px; margin-left: 1px; }
#levels img.disabled:active { margin-top: 0; margin-left: 0; }

#instructions {
  background: #DDD;
      border: 2px solid #333;
       color: #555;
     padding: 0.5em 1em;
 white-space: nowrap;
  text-align: center;
       width: 18em;
      margin: 0 auto;
    position: relative;
         top: -16em;
}
#instructions b { color: black; }

#instructions       .keyboard { display: block; }
#instructions       .touch    { display: none;  }
#instructions.touch .keyboard { display: none;  }
#instructions.touch .touch    { display: block; }

#controls {
  position: absolute;
    bottom: 0.5em;
      left: 0.5em;
}
#controls input,
#controls label { vertical-align: middle; }

/********************************/
/* re-usable class-based styles */
/********************************/

.unsupported {
            border: 1px solid yellow;
             color: black;
  background-color: #FFFFAD;
           padding: 2em;
            margin: 5em;
           display: inline-block;
}

/*****************************/
/* @media query based layout */
/*****************************/

@media screen and (min-width: 0px) {
  #breakout     { display: block; width: 640px; height: 480px; margin: 1em auto; border: 1px solid #AAA; }
  #canvas       { display: block; width: 640px; height: 480px; background: url(images/stih2.png); }
  #instructions { font-size: 8pt; }
}

@media screen and (min-width: 1200px) {
  #breakout     { width: 800px; height: 600px; }
  #canvas       { width: 800px; height: 600px; background: url(images/stih.png); }
  #instructions { font-size: 10pt; }
}
