html {
  color-scheme: light;
  background: var(--theme);
}
body {
  color: #202637;
  overflow: hidden;
}
.layout {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
  padding: var(--inset-top, env(safe-area-inset-top, 0px))
           var(--inset-right, env(safe-area-inset-right, 0px))
           var(--inset-bottom, env(safe-area-inset-bottom, 0px))
           var(--inset-left, env(safe-area-inset-left, 0px));
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 10px;
  background: #ffffff;
  border-bottom: 1px solid #20263730;
}
.top a, .top button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: inherit;
  font-size: 14px;
  font-weight: 650;
}
.top button {
  padding: 0 10px;
  border: 1px solid #737b89;
  border-radius: 8px;
  background: #ffffff;
}
.arena {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
}
.arena.playing { touch-action: none; }
.surface { position: relative; }
canvas {
  display: block;
  image-rendering: pixelated;
  touch-action: none;
}
.actions, .paused {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.actions button {
  position: absolute;
  border: 0;
  padding: 0;
  background: transparent;
  /* The first touch can start the game and continue as a canvas drag. */
  pointer-events: none;
}
.actions button:focus-visible {
  outline: 3px solid #273b8f;
  outline-offset: 1px;
}
.actions button:disabled {
  pointer-events: none;
}
.paused {
  width: 100%;
  border: 0;
  display: grid;
  place-items: center;
  background: #202637bb;
  color: #ffffff;
  font-weight: bold;
  pointer-events: auto;
}
