body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  font-family: sans-serif;
  font-size: 16px;
}

h1 {
  margin: -0.1em 0.5em -0.1em 0.5em;
  align-content: center;
  display: flex;
  height: 1em;
}

button {
  background-color: #0083BF;
  border: 1px solid #4CBFF3;
  border-radius: 4px;
  color: white;
  padding: 2px 0.5em;
  cursor: pointer;
  height: 1.8em;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
button:hover {
  background-color: #0072A7;
}
button:active {
  background-color: #33B6F2;
}
button:disabled {
  opacity: 0.3;
}
button svg {
  fill: white;
  height: 1em;
  width: 1em;
  margin: -0.1em 0;
}
button.selected {
  border: 1px solid rgba(0, 0, 255, 0.2);
  background-color: #CCECFB;
  color: #005277;
  border: 1px solid #0072A7;
}

.container {
  height: 100%;
  width: 100%;
}

.toolbar {
  padding: 0.5em;
  background-color: #00A4EF;
  display: flex;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  z-index: 10;
  flex-direction: row;
  align-content: center;
  color: white;
  flex-wrap: wrap;
}
.toolbar div {
  padding: 0 1em;
  height: 24px;
  align-content: center;
  display: flex;
  border-left: 1px solid rgba(0, 0, 0, 0.1);
}
.toolbar div:first-child {
  border-left: 0;
}
.toolbar label {
  font-size: 12px;
  white-space: nowrap;
  padding: 0.5em 0.5em 0 0;
}
.toolbar button {
  margin-right: 0.5em;
  white-space: nowrap;
}
.toolbar button:last-child {
  margin-right: 0;
}

@media only screen and (max-width: 550px) {
  body {
    font-size: 16px;
  }

  h1 {
    margin: 0 0.5em 0 0.25em;
    align-content: center;
    display: flex;
    height: 1em;
  }

  .toolbar > .mfw {
    flex-shrink: 0;
    width: 100%;
    padding: 0.5em 0 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    border-left: 0;
    margin-top: 0.5em;
  }
  .toolbar > .mfw:first-child {
    margin-top: 0;
  }
}
#stroke {
  height: 28px;
  margin: -2px 0;
}

#color-blocks {
  display: flex;
}
#color-blocks .color-block {
  width: 1.5em;
  height: 1.5em;
  background-color: white;
  margin-left: 1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

#lineWidth {
  width: 4em;
  height: 24px;
}

#line-widths {
  display: flex;
}
#line-widths > span {
  width: 1.5em;
  height: 1.5em;
  background-color: white;
  margin-left: 1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(0, 0, 0, 0.1);
}
#line-widths > span.selected {
  border: 1px solid rgba(0, 0, 255, 0.2);
  background-color: rgba(200, 200, 255, 0.8);
}
#line-widths > span > span {
  border-radius: 50%;
  background-color: black;
  display: inline-block;
}
#line-widths #line-width-1 span {
  height: 1px;
  width: 1px;
}
#line-widths #line-width-2 span {
  height: 2px;
  width: 2px;
}
#line-widths #line-width-3 span {
  height: 3px;
  width: 3px;
}
#line-widths #line-width-5 span {
  height: 5px;
  width: 5px;
}
#line-widths #line-width-8 span {
  height: 8px;
  width: 8px;
}
#line-widths #line-width-13 span {
  height: 13px;
  width: 13px;
}
#line-widths #line-width-17 span {
  height: 17px;
  width: 17px;
}
#line-widths #line-width-21 span {
  height: 21px;
  width: 21px;
}

.drawing-board {
  z-index: 10;
  width: 100%;
  cursor: pointer;
}

#modal {
  position: absolute;
  z-index: 10;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
#modal button {
  margin-top: 0.5em;
}
#modal #close {
  background-color: transparent;
  border: 0;
  color: white;
  float: right;
  margin: 0.25em 0.5em;
  font-weight: bold;
  font-size: 150%;
  cursor: pointer;
  box-shadow: none;
}

#modal-message {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  background-color: #00A4EF;
  padding: 1em;
}

form {
  margin: 3em auto;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  background-color: white;
  border: 2px solid #ddd;
  max-width: 300px;
  color: #222;
  padding: 1em;
}
form label {
  display: block;
}
form input, form textarea {
  margin-bottom: 0.5em;
}
form button {
  margin-top: 0.5em;
}

video, canvas {
  z-index: 5;
}