* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #18191f;
  color: #f8f1df;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.stage {
  width: 100vw;
  height: 100vh;
  display: grid;
  place-items: center;
}

.battle-scene-group,
canvas {
  grid-area: 1 / 1;
  display: block;
  position: relative;
  width: min(100vw, 177.78vh);
  height: min(56.25vw, 100vh);
}

.battle-scene-group {
  display: grid;
  position: relative;
  z-index: 0;
  contain: layout paint size;
  isolation: isolate;
  will-change: transform;
  backface-visibility: hidden;
  overflow: hidden;
}

.battle-scene-group canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.battle-glint-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
  contain: layout paint size;
}

.battle-glint {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 50% 50%;
}

canvas {
  image-rendering: auto;
  touch-action: none;
  cursor: default;
}

#gameCanvas {
  z-index: 1;
}

#battleUiCanvas {
  z-index: 2;
}

#battleOverlayCanvas {
  z-index: 3;
}

#battleVolatileCanvas {
  z-index: 3;
}

#battleFxCanvas {
  z-index: 4;
}

#hudCanvas {
  z-index: 5;
}

.render-layer {
  pointer-events: none;
  backface-visibility: hidden;
}
