/* © 2026 Jattar Tajjar. Kroniki Lorviku. Wszelkie prawa zastrzeżone. */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* The canvas fills the page from the top-left corner: its backing size is the logical framebuffer
   times the integer zoom and its CSS size equals the backing size, so there is never any CSS scaling. */
canvas#screen {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  cursor: crosshair;
  outline: none;
  -webkit-user-select: none;
  user-select: none;
}

/* Touch version (the html.touch class is set before the first measurement). The page never scrolls or zooms, the
   canvas sits fixed at the top-left corner and its size is set in device pixels by the game. */
html.touch, html.touch body {
  position: fixed;
  inset: 0;
  height: 100%;
  height: 100dvh;
  overscroll-behavior: none;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
html.touch canvas#screen {
  position: fixed;
  left: 0;
  top: 0;
  touch-action: none;
  cursor: default;
}

/* text inputs of the touch version, placed over the canvas by the game; 16 px keeps iOS from zooming in */
#tin, #tin-chat {
  position: fixed;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  margin: 0;
}
#tin input, #tin-chat input {
  position: fixed;
  display: none;
  box-sizing: border-box;
  margin: 0;
  padding: 0 6px;
  border: 2px solid #fcfc54;
  border-radius: 0;
  background: #000;
  color: #ececec;
  font: 16px monospace;
  text-transform: uppercase;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  -webkit-user-select: text;
  user-select: text;
  touch-action: manipulation;
  z-index: 2;
}
#tin input.on, #tin-chat input.on {
  display: block;
}
#tin-chat input::placeholder {
  color: #5c5c5c;
}
