@import url('https://fonts.googleapis.com/css?family=Lato:400,400i,700,700i|Press+Start+2P|Overpass+Mono:400,700');

* {
  margin: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  padding: 40px;
  background: #222;
  color: #fff;
  line-height: 1.5;
  font-size: 16px;
  font-weight: 400;
  font-family: 'Lato', 'Helvetica', 'Arial', sans-serif;
}

h1 {
  font-size: 22px;
  font-weight: 300;
  color: #fdcf1a;
  font-family: 'Press Start 2P', sans-serif;
  margin: 20px 0 20px 2px;
}

body > :first-child {
  margin-top: 0;
}

a {
  color: #fdcf1a;
}

p {
  margin: 10px 2px;
  max-width: 66ch;
}

small {
  font-size: 0.8rem;
}

strong {
  font-weight: bold;
  color: #01a7ee;
}

blockquote {
  font-style: italic;
  max-width: 62ch;
  margin: 1.5em 2ch;
  color: #bbb;
}

.qm-note {
  display: block;
  font-size: 0.8em;
  font-style: italic;
  color: #bbb;
  margin-top: 2em;
}

.qm-note:before {
  content: "QM> ";
  color: #fff;
  font-style: normal;
}

.qm-note a {
  color: #888;
}

.emoji {
  font-style: normal;
}

#images {
  display: block;
}

#images img {
  display: inline-block;
  height: 280px;
  margin: 0 10px 10px 0;
}

#images .sound-container {
  display: inline-block;
  position: relative;
}

#images audio {
  display: block;
  position: absolute;
  left: 10px; bottom: 30px;
  max-width: 400px;
  max-height: 30px;
  opacity: 0.8;
}


/* answer form */

#answer {
  margin: 1em 0;
}

#answer label {
  margin: 0 1ch 0 2px;
  vertical-align: middle;
}

#answer input[type="text"] {
  font-family: 'Overpass Mono', monospace;
  font-size: 13px;
  padding: 5px;
  border-radius: 2px;
  border: 1px solid #ccc;
  background: #ededed;
  letter-spacing: 1.1px;
  height: 28px;
  vertical-align: middle;
  margin: 0 1ch 0 0;
  -webkit-appearance: none;  /* no roundedness on iOS */
}

#answer input[type="submit"] {
  background-color: #ededed;
  border-radius: 2px;
  border: 1px solid #dcdcdc;
  display: inline-block;
  cursor: pointer;
  color: #000;
  font-size: 12px;
  padding: 5px 20px;
  text-decoration: none;
  margin: 0 2px;
  height: 28px;
  vertical-align: middle;
  -webkit-appearance: none;  /* no roundedness on iOS */
}

#answer input[type="submit"]:hover {
  background-color:#fdcf1a;
  border: 1px solid #b99a1b;
}

#answer input[type="submit"]:active {
  background-color:#ffe57b;
  border: 1px solid #fdcf1a;
}


@media (max-width: 600px) {
  body {
    padding: 25px;
  }

  #images img {
    max-width: 100%;
    height: auto;
    margin: 0 0 10px 0;
  }

  #answer {
    margin: 0;
  }

  #answer label {
    display: block;
    margin-bottom: 10px;
    width: 100%;
  }

  #answer input[type="submit"] {
    display: block;
    margin: 8px 0 0 0;
    width: 100%;
    padding: 10px 20px;
    height: 38px;
  }

  #answer input[type="text"] {
    display: block;
    width: 100%;
    height: 32px;
  }

  /*
   * Force a bottom border on Safari iOS and
   * avoid its bottom toolbar when clicking:
   */
  body:after {
    content: '\00a0';
    padding-bottom: 50px;
  }
}
