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

html,
body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  background: #000000;
  overflow: hidden;
  display: grid;
  place-items: center;
  user-select: none;
  -webkit-user-select: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  background: repeating-linear-gradient(
    to bottom,
    #ffffff 0px,
    #ffffff 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: 0.06;
}

body.idle-cursor,
body.idle-cursor * {
  cursor: none !important;
}

#grid {
  margin: 0;
  padding: 0;
  background: #000000;
  font-family: "Courier New", Consolas, "Liberation Mono", Menlo, monospace;
  font-weight: 700;
  white-space: pre;
  font-variant-ligatures: none;
  text-rendering: optimizeSpeed;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  display: block;
  contain: strict;
  will-change: contents;
}

#probe {
  position: fixed;
  top: -9999px;
  left: -9999px;
  visibility: hidden;
  pointer-events: none;
  font-family: "Courier New", Consolas, "Liberation Mono", Menlo, monospace;
  font-weight: 700;
  letter-spacing: 0px;
  white-space: pre;
}

#startBtn {
  position: fixed;
  z-index: 10;
  background: transparent;
  color: #f2efe6;
  border: 1px solid rgba(242, 239, 230, 0.35);
  padding: 10px 26px;
  font-family: "Courier New", Consolas, monospace;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
}

#startBtn:hover,
#startBtn:focus-visible {
  outline: none;
  border-color: #f2efe6;
  background: rgba(242, 239, 230, 0.08);
}

#startBtn.hidden {
  display: none;
}

#debug {
  position: fixed;
  top: 12px;
  left: 12px;
  max-width: calc(100vw - 24px);
  z-index: 30;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.78);
  border: 1px solid rgba(242, 239, 230, 0.28);
  color: #f2efe6;
  font-family: "Courier New", Consolas, monospace;
  font-size: 12px;
  line-height: 1.4;
  pointer-events: none;
  white-space: pre-wrap;
}

#debug.hidden {
  display: none;
}
