html, body {
  width: 100%;
  min-height: 100%;
  font: 14px system-ui;
}

body {
  margin: 0;
  background: black;
  position: relative;
}

#c {
  position: fixed;
  display: block;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

#ed {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.editor {
  font: 14px monospace;
  flex: 1;
  position: relative;
}

body.view {
  cursor: none;
}

body.view #ed {
  display: none;
}

#ed .editor textarea {
  font: inherit;
  background: none;
  border: none;
  outline: none;
  resize: none;
  z-index: 1;
}

.editor textarea, .editor .overlay {
  position: absolute;
  top: 0;
  bottom: 0;
}

.editor textarea, .editor .underlay, .editor .overlay {
  color: white;
  margin: 0;
  padding: 0.5em;
  box-sizing: border-box;
  width: 100%;
  min-height: 100%;
  overflow: hidden;
}

.editor .underlay, .editor .overlay {
  color: transparent;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
  white-space: pre-wrap;
}

.editor .overlay {
  opacity: 0.8;
  z-index: 2;
}

.editor .underlay {
  opacity: 0.8;
  z-index: 0;
}

.editor .underlay span {
  background: black;
  margin: -0.25em;
  padding: 0.25em;
}

.editor .overlay .number {
  color: rgba(50, 10, 255, 255);
  cursor: pointer;
  pointer-events: auto;
  border-radius: 3px;
}

#enableAudioContext {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  text-align: center;
  padding: 1em;
}

#enableAudioContext:not(.visible) {
  display: none;
}

#toolbar {
  background: rgba(0, 0, 0, 0.3);
  color: white;
  margin-bottom: 0.5em;
  display: flex;
}

#toolbar > .left {
  flex: 1;
}

#toolbar > .right {
}

.fullscreenButton {
  background: none;
  border: none;
  font: inherit;
  color: inherit;
}

#toolbar .tabs {
  color: white;
  list-style: none;
  display: flex;
  padding: 0;
  margin: 0;
}

#toolbar .tabs > li {
  padding: 0.3em 0.5em;
}

#toolbar .tabs > li[data-selected] {
  background: rgba(255, 255, 255, 0.7);
  color: black;
}

#toolbar .tabs > li:not([data-selected]):hover {
  background: rgba(255, 255, 255, 0.3);
}

#toolbar .tabs > li[data-selected]:hover {
  background: rgba(200, 200, 200, 0.7);
}

[data-tab]:not([data-tab-selected]) {
  display: none;
}

#errorZone {
  position: fixed;
  background: rgba(255, 0, 0, 0.5);
  color: white;
  padding: 0.25em;
  font-family: monospace;
  font-size: 1.25em;
  left: 0;
  right: 0;
  bottom: 0;
}

#errorZone:not(.visible) {
  display: none;
}

#errorSummary {
  white-space: pre-wrap;
  margin: 0.5em;
}

#errorSource {
  white-space: pre-wrap;
  overflow: auto;
  max-height: 40vh;
  counter-reset: line;
}

#errorSource > div {
  display: flex;
}

#errorSource > div::before {
  counter-increment: line;
  content: counter(line);
  width: 2em;
  background: rgba(255, 255, 255, 0.2);
  display: block;
  text-align: right;
  padding-right: 0.25em;
  margin-right: 0.25em;
}

#errorSource > div.interesting {
  background: rgba(255, 255, 255, 0.2);
}

