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

html,
body {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  color: #aaa;
  font: 12px monospace;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#screen {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#screen > div {
  display: none !important;
}

#screen canvas {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
  transform: none !important;
  image-rendering: auto !important;
  cursor: none;
}

#loader {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #000;
  font-size: 13px;
}

#loader.done {
  display: none;
}

#loader .track {
  width: 200px;
  height: 2px;
  background: #222;
}

#loader .fill {
  width: 0;
  height: 100%;
  background: #aaa;
}

#loader .retry {
  display: none;
  color: #fff;
}

#loader.error .track {
  display: none;
}

#loader.error .retry {
  display: block;
}

#bar {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  background: rgba(0, 0, 0, 0.7);
}

#bar.hidden {
  display: none;
}

button {
  padding: 6px 8px;
  border: 0;
  background: none;
  color: #aaa;
  font: inherit;
  cursor: pointer;
}

button:hover {
  color: #fff;
}

#toast {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 25;
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.7);
  pointer-events: none;
}

#toast.hidden {
  display: none;
}

#typer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 26;
  display: none;
}

#typer.open {
  display: block;
}

#typer input {
  width: 100%;
  padding: 8px;
  border: 0;
  border-top: 1px solid #333;
  background: #000;
  color: #fff;
  font: 16px monospace;
  outline: none;
  user-select: text;
  -webkit-user-select: text;
}

#ffwd {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: none;
  padding: 16px;
  background: rgba(0, 0, 0, 0.7);
  touch-action: none;
}

#ffwd.show {
  display: block;
}

#ffwd.held {
  color: #fff;
  background: #333;
}
