:root {
  color-scheme: dark;
  background: #050607;
  font-family: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, #182028 0, #090c0f 48%, #030405 100%);
}

.smartphone-blocker {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-content: center;
  justify-items: center;
  gap: 16px;
  padding: 28px;
  color: #e6f8ff;
  text-align: center;
  background:
    radial-gradient(circle at 50% 38%, #17334a 0, #07101b 52%, #020408 100%);
}

.smartphone-blocker img {
  width: min(128px, 30vw);
  height: auto;
}

.smartphone-blocker h1,
.smartphone-blocker p {
  margin: 0;
}

.smartphone-blocker h1 {
  color: #76d6ff;
  font-size: clamp(1.6rem, 8vw, 2.7rem);
  text-transform: uppercase;
}

.smartphone-blocker p {
  max-width: 34rem;
  color: #b5c9d8;
  font-size: clamp(1rem, 4.5vw, 1.25rem);
  line-height: 1.55;
}

.smartphone-blocker small {
  color: #7892a4;
  font: 12px/1.4 monospace;
}

body.smartphone-blocked .smartphone-blocker {
  display: grid;
}

body.smartphone-blocked .game-shell {
  visibility: hidden;
}

.game-shell {
  display: grid;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  overflow: hidden;
  place-items: center;
}

.canvas-stage {
  display: grid;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  place-items: center;
}

canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  background: #000;
  cursor: none;
  outline: none;
  touch-action: none;
}

canvas:focus-visible {
  box-shadow: inset 0 0 0 3px #62d8ff;
}

.status {
  display: none;
}

.status.performance-visible {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 10;
  display: block;
  margin: 0;
  padding: 6px 9px;
  color: #c8f7ff;
  background: rgb(0 0 0 / 78%);
  font: 12px/1.4 monospace;
  pointer-events: none;
}

.status.server-visible {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 10;
  display: block;
  max-width: min(420px, calc(100vw - 24px));
  margin: 0;
  padding: 9px 12px;
  color: #dff8ff;
  background: rgb(4 18 31 / 92%);
  border: 1px solid #43bfff;
  font: 13px/1.4 Arial, Helvetica, sans-serif;
  pointer-events: none;
}

.status.server-success {
  color: #edfff3;
  background: rgb(8 45 24 / 94%);
  border-color: #44d17a;
}

.status.server-error {
  color: #fff2f5;
  background: rgb(58 10 22 / 94%);
  border-color: #ff5b82;
}

.status.server-pending {
  color: #fff9df;
  background: rgb(55 43 8 / 94%);
  border-color: #ffd45b;
}
