html, body {
  background: #234;
  color: white;
  margin: 0;
  padding: 0;
}

body {
  font-family: arial, sans-serif;
  font-size: 14px;

  -webkit-font-smoothing: subpixel-antialiased;

  font-weight: normal;
  line-height: 1.5;

  -moz-osx-font-smoothing: grayscale;

  size: portrait;

  -webkit-tap-highlight-color: rgba(0,0,0,0);
  -webkit-text-size-adjust: none;
  -moz-text-size-adjust: none;
  -ms-text-size-adjust: none;

  touch-action: manipulation;

  -webkit-touch-callout: none;

  user-select: none;

  padding-top: constant(safe-area-inset-top);
  padding-top: env(safe-area-inset-top);
}

h1 {
  font-size: 24px;
}

h2 {
  font-size: 18px;
}

/* components */
#canvas {
  align-items: stretch;
  display: flex;
  height: 100vh;
  position: relative;
  transform: translate3d(-250px, 0, 0);
  transition: all 400ms ease;
  width: calc(100vw + 250px);
}
#config {
  background-color: #d3d3d3;
  box-sizing: border-box;
  color: #708090;
  font-size: 10px;
  padding: 20px 10px;
  width: 250px;
}
#config > form > div {
  margin: 0 0 10px;
}
#config > form > div.form-actions {
  display: flex;
  flex-wrap: wrap;
}
#config > form > div.form-actions > a {
  flex: 1 1 auto;
}
#config h2 {
  background-color: #d3d3d3;
  border-radius: 0 0 20px 0;
  cursor: pointer;
  display: block;
  font-size: 12px;
  left: 250px;
  margin: 0 0 10px;
  padding: 2px 20px 2px 5px;
  position: absolute;
  top: 0;
}
#config h2:before, #config h2:after {
  background-color: #708090;
  content: '';
  display: block;
  height: 2px;
  margin-top: -1px;
  position: absolute;
  right: 10px;
  transform-origin: center;
  transition: transform 400ms ease;
  top: 50%;
  width: 7px;
}
#config .button {
  background-color: #8fbc8f;
  box-shadow: none;
  display: block;
  font-size: 10px;
  margin: 2px;
  padding: 5px;
  text-align: center;
}
#config .button:first-child {
  margin-left: 0;
}
#config .button:last-child {
  margin-right: 0;
}
#config .button.reset {
  background-color: #708090;
}
#config .button.clear-user {
  background-color: #c76868;
}
#config label {
  width: 100%;
  display: flex;
  align-items: center;
}
#config select {
  width: 100%;
  white-space: wrap;
}
#config input:not([type="checkbox"]) {
  width: 100%;
  box-sizing: border-box;
  border-radius: 3px;
}
#config input[type="checkbox"] {
  margin-right: 10px;
}
#canvas.open {
  transform: translate3d(0, 0, 0);
}
#canvas.open #config h2:before {
  transform: rotate(45deg);
}
#canvas.open #config h2:after {
  transform: rotate(-45deg);
}

input[type="text"] {
  border: 1px solid #708090;
  padding: 5px;
}
.checkbox, input[type="checkbox"] {
  cursor: pointer;
}
.checkbox > span, .checkbox input[type="checkbox"] {
  vertical-align: middle;
}
label:not(.checkbox) {
  display: block;
}

#app {
  flex: 1 0 auto;
  width: 100vw;
}

div[role="main"] {
  margin: 0 auto;
  max-width: 320px;
  padding: 20px;
}

.page {
  left: -1000px;
  height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  top: 0;
  -webkit-transform: translate3d(0, 30px, 0);
  transform: translate3d(0, 30px, 0);
  -webkit-transition: all 0.2s ease-out;
  transition: opacity 0.2s linear, transform 0.2s ease-out;
}
.page-active, .result-active {
  height: auto;
  opacity: 1;
  pointer-events: auto;
  position: static;
  -webkit-transform: none;
  transform: none;
}

.actions {
  margin: 2em 0;
  text-align: center;
}

.button {
  background: #ff8800;
  border-radius: 3px;
  box-shadow: 3px 3px 5px rgba(0,0,0,0.2);
  box-sizing: border-box;
  color: white;
  display: block;
  padding: 10px;
  position: relative;
  text-decoration: none;
  text-transform: uppercase;
  -webkit-transition: top 0.2s ease-out;
  transition: top 0.2s ease-out;
}
.button:active {
  box-shadow: 3px 0 4px rgba(0,0,0,0.2);
  top: 3px;
}
.button + .button {
  margin-top: 10px;
}
