:root {
  color-scheme: dark;
  font: 13px/1.5 ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  background: #11151b;
  color: #f4f6f8;
}

body {
  margin: 0;
  overflow: hidden;
}

canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

[hidden] {
  display: none !important;
}

.panel {
  font: inherit;
  margin: 0;
  padding: 9px 12px;
  background: rgb(12 15 20 / 88%);
  border-radius: 6px;
}

#status, #readout {
  position: fixed;
  inset: max(12px, env(safe-area-inset-top)) auto auto max(12px, env(safe-area-inset-left));
  max-width: calc(100vw - 48px);
  overflow-wrap: anywhere;
  pointer-events: none;
}

#actions {
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  display: grid;
  justify-items: end;
  gap: 6px;
  pointer-events: none;
}

button {
  font: inherit;
  min-height: 44px;
  padding: 0 14px;
  color: inherit;
  background: #202831;
  border: 1px solid #737f8f;
  border-radius: 6px;
  cursor: pointer;
  pointer-events: auto;
}

button:disabled {
  opacity: 0.65;
}

#editor {
  position: fixed;
  bottom: max(12px, env(safe-area-inset-bottom));
  left: max(12px, env(safe-area-inset-left));
  display: grid;
  gap: 4px;
}

.tools {
  display: flex;
  gap: 4px;
}

#editor button {
  padding-inline: 7px;
}

#editor [aria-pressed="true"] {
  border-color: #f0d499;
  box-shadow: inset 0 0 0 1px #f0d499;
}

#edit-colours button {
  min-width: 38px;
  background: var(--swatch);
}

#edit-refusal {
  position: fixed;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  transform: translate(-50%, -210px);
  max-width: calc(100vw - 48px);
  width: max-content;
}

#timings {
  overflow-wrap: anywhere;
}

#crosshair {
  position: fixed;
  top: 50%;
  left: 50%;
  color: #fff;
  pointer-events: none;
}

#crosshair::before, #crosshair::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  background: currentColor;
  box-shadow: 0 0 2px 1px #000;
}

#crosshair::before {
  width: 13px;
  height: 1px;
}

#crosshair::after {
  width: 1px;
  height: 13px;
}

#crosshair.target {
  color: #f9d988;
}

@media (min-width: 860px) {
  #editor {
    display: flex;
    align-items: center;
  }

  #edit-refusal {
    transform: translate(-50%, -70px);
  }
}
