html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #1b1b1b;
}

/* The editor draws itself on this canvas, which fills the page. */
#cutwright {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  outline: none;
}

#loading {
  position: fixed;
  inset: 0;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 1em;
  color: #c8c8c8;
  font: 16px system-ui, sans-serif;
  text-align: center;
}

[hidden] {
  display: none !important;
}

/* Signing in: a plain form in the middle of the page, shown before the
   editor starts. */
#sign-in {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-sizing: border-box;
  width: min(22rem, calc(100% - 2rem));
  padding: 1.5rem;
  border: 1px solid #3c3c3c;
  border-radius: 10px;
  background: #262626;
  color: #e6e6e6;
  font: 16px system-ui, sans-serif;
  display: grid;
  gap: 0.4rem;
}

#sign-in h1 {
  margin: 0 0 0.6rem;
  font-size: 1.5rem;
  font-weight: 500;
}

#sign-in label {
  margin-top: 0.4rem;
  font-size: 0.875rem;
  color: #b4b4b4;
}

#sign-in input {
  padding: 0.55rem 0.65rem;
  border: 1px solid #4a4a4a;
  border-radius: 6px;
  background: #1b1b1b;
  color: inherit;
  font: inherit;
}

#sign-in input:focus-visible,
#sign-in button:focus-visible {
  outline: 2px solid #5aa9ff;
  outline-offset: 1px;
}

#sign-in button {
  margin-top: 1rem;
  padding: 0.6rem;
  border: 0;
  border-radius: 6px;
  background: #2f7fd6;
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

#sign-in button:disabled {
  opacity: 0.6;
  cursor: default;
}

#sign-in-error {
  margin: 0.4rem 0 0;
  min-height: 1.3em;
  color: #ff8f8f;
  font-size: 0.9rem;
}
