html, body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body.lcd-mode {
  background: #000;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* The whole page is the test color; its value is set from the page's script. */
.stage {
  position: fixed;
  inset: 0;
  background: #fff;
}

/*
 * The buttons sit on whatever color is chosen, so a fixed fill would vanish on one color or another.
 * mix-blend-mode: difference inverts against the backdrop instead (dark on white, light on black, a
 * contrasting hue on a color), as the Advanced Mode exit button does.
 */
.lcd-button {
  width: 48px;
  height: 48px;
  font-size: 22px;
  flex-shrink: 0;
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
  mix-blend-mode: difference;
  -webkit-touch-callout: none;
}

.lcd-button:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lcd-button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.exit-fullscreen {
  position: absolute;
  top: calc(10px + env(safe-area-inset-top, 0px));
  left: calc(10px + env(safe-area-inset-left, 0px));
  z-index: 5;
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  mix-blend-mode: difference;
}

.exit-fullscreen:hover,
.exit-fullscreen:focus-visible {
  transform: scale(1.15);
}

body.fullscreen-mode .exit-fullscreen {
  display: inline-flex;
}

body.fullscreen-mode .bar {
  display: none;
}
