* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  font-family: sans-serif;
  color: #fff;
}
button {
  height: 56px;
  cursor: pointer;
  background: transparent;
  border: 0;
  padding: 4px;
  text-align: center;
}
svg {
  stroke: #fff;
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
}

.screen {
  display: grid;
}
.dither {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  max-width: 100%;
  max-height: 100%;
  image-rendering: pixelated;
}

.shrink,
video {
  display: none;
}
.app {
  height: 100%;
  width: 100%;
  max-height: 100%;
  display: grid;
  grid-template-rows: 1fr;
}
.preview {
  overflow: hidden;
  background: #000;
  position: relative;
}
.preview p {
  position: absolute;
  top: 48%;
  left: 0;
  right: 0;
  text-align: center;
}
.preview.active p {
  display: none;
}
.controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #48c;
}
.controls svg {
  width: 32px;
  height: 32px;
}
.snap svg {
  width: 40px;
  height: 40px;
}
.camera {
  grid-template-rows: 1fr auto;
}
.snaps {
  display: none;
  flex: 1 1 auto;
  overflow: auto;
  position: relative;
  background: #1c5ea0;
  padding: 1em 0;
}
.show-snaps .snaps {
  display: block;
}
.snaps .snap {
  display: block;
  text-align: center;
  margin: 1em auto;
}
.snaps a {
  display: inline-block;
}
.show-snaps .camera {
  display: none;
}
.snaps img {
  display: block;
  max-width: 100%;
}
.snaps .close {
  position: fixed;
  top: 1em;
  right: 1em;
  width: 32px;
  height: 32px;
}

.bar {
  color: #fff;
  height: 48px;
  background: #1c5ea0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-around;
  padding: 0 1em;
  display: none;
}
.bar input {
  flex: 1;
  margin-left: 2em;
}
[data-open="exposure"] .exposure-bar {
  display: flex;
}
[data-open="exposure"] .show-exposure {
  background: #1c5ea0;
}
[data-open="zoom"] .zoom-bar {
  display: flex;
}
[data-open="zoom"] .show-zoom {
  background: #1c5ea0;
}
