html,
body {
  margin: 0;
  height: 100%;
  background: #181425;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: monospace;
}

#screen {
  display: block;
  cursor: none;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  touch-action: none;
}

/* ---- text entry overlay (login, warband name) ---- */
#overlay {
  position: fixed;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(24, 20, 37, 0.45);
}

#overlay.hidden {
  display: none;
}

#overlay .panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: min(340px, 86vw);
  padding: 20px 22px;
  background: rgba(24, 20, 37, 0.95);
  border: 2px solid #feae34;
  box-shadow: 0 0 0 4px #3e2731;
  color: #ead4aa;
  font: bold 14px monospace;
  letter-spacing: 1px;
}

#overlay .title {
  color: #feae34;
  font-size: 18px;
  text-align: center;
}

#overlay label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #8b9bb4;
  font-size: 12px;
}

#overlay input {
  font: bold 16px monospace;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #ead4aa;
  background: #262b44;
  border: 2px solid #5a6988;
  padding: 8px;
  outline: none;
}

#overlay input[type='password'] {
  text-transform: none;
}

#overlay input:focus {
  border-color: #fee761;
}

#overlay .msg {
  min-height: 14px;
  color: #e43b44;
  font-size: 12px;
  text-align: center;
}

#overlay .row {
  display: flex;
  gap: 10px;
}

#overlay button {
  flex: 1;
  font: bold 14px monospace;
  letter-spacing: 2px;
  color: #181425;
  background: #63c74d;
  border: none;
  padding: 10px;
  cursor: pointer;
}

#overlay button.secondary {
  color: #ead4aa;
  background: #5a6988;
}

/* dev art gallery */
body.gallery {
  display: block;
  overflow: auto;
}

#gallery {
  image-rendering: pixelated;
}
