.brawl-scene {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  padding:
    max(56px, var(--scoreboard-bottom, 0px))
    8px
    max(12px, env(safe-area-inset-bottom));
  background: #0a0d14;
  overflow: hidden;
  color: #dfe5f2;
}

.brawl-scene[hidden] {
  display: none !important;
}

.brawl-stage {
  flex: 1;
  width: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Touch pad: arrows stacked on the left edge, A and B stacked on the right, over the scene. */
.brawl-pad {
  display: none;
  position: absolute;
  right: max(10px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  left: max(10px, env(safe-area-inset-left));
  justify-content: space-between;
  align-items: flex-end;
  pointer-events: none;
  touch-action: none;
}

.brawl-pad-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: auto;
}

.brawl-pad-key {
  width: 64px;
  height: 56px;
  border: 0;
  border-radius: 14px;
  background: rgb(255 255 255 / 0.14);
  color: #fff;
  font: 800 18px/1 ui-sans-serif, system-ui, sans-serif;
  touch-action: none;
}

@media (pointer: coarse) {
  .brawl-pad {
    display: flex;
  }

  .brawl-scene.is-picking .brawl-pad {
    display: none;
  }
}

.brawl-pick {
  width: min(100%, 760px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 0 8px 6px;
}

.brawl-pick[hidden] {
  display: none !important;
}

.brawl-pick-bar {
  display: flex;
  align-items: center;
  gap: 0;
  min-height: 84px;
  padding: 8px;
  border-radius: 999px;
  background: #1f7a3a;
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / 18%), 0 8px 18px rgb(0 0 0 / 28%);
}

.brawl-pick-back[hidden] {
  display: none !important;
}

.brawl-pick-back {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  margin-right: 4px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #f4fff6;
  display: grid;
  place-items: center;
}

.brawl-pick-back svg {
  width: 28px;
  height: 28px;
}

.brawl-pick-row {
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
}

.brawl-pick-choice {
  flex: 1;
  min-width: 0;
  border: 0;
  border-left: 1px solid rgb(255 255 255 / 28%);
  background: transparent;
  padding: 4px 0;
  display: grid;
  place-items: center;
}

.brawl-pick-row .brawl-pick-choice:first-child {
  border-left: 0;
}

.brawl-pick-disc {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f7f7f5;
  color: #146b32;
  box-shadow: 0 6px 0 rgb(0 0 0 / 18%);
}

.brawl-pick-choice.is-on .brawl-pick-disc,
.brawl-pick-choice:focus-visible .brawl-pick-disc {
  outline: 3px solid #d8ff6a;
  outline-offset: 3px;
}

.brawl-pick-disc svg {
  width: 34px;
  height: 34px;
}

.brawl-pick-labels {
  display: flex;
  gap: 8px;
  padding: 0 8px;
}

.brawl-pick-name,
.brawl-pick-spacer {
  flex: 1;
  min-width: 0;
  min-height: 28px;
  padding: 6px 8px;
  border-radius: 999px;
  background: #145c32;
  color: #fff;
  text-align: center;
  font: 700 13px/1.15 ui-sans-serif, system-ui, sans-serif;
}

.brawl-pick-spacer {
  flex: 0 0 52px;
  padding: 0;
  background: transparent;
}

.brawl-stage canvas {
  display: block;
  background: #161d2a;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  touch-action: none;
  box-shadow: 0 0 0 2px #1f2840;
}
