html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #111827;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

#game {
  width: 100vw;
  height: 100dvh;
}

canvas {
  display: block;
}

.debug-bar {
  position: fixed;
  left: max(8px, env(safe-area-inset-left));
  right: max(8px, env(safe-area-inset-right));
  bottom: max(8px, env(safe-area-inset-bottom));
  z-index: 999;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.9);
  color: #ffffff;
  font-size: 12px;
  line-height: 1.2;
  pointer-events: auto;
  touch-action: manipulation;
  backdrop-filter: blur(14px);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.34);
}

.debug-row,
.debug-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.debug-row {
  justify-content: space-between;
  margin-bottom: 9px;
}

.debug-controls {
  flex-wrap: wrap;
}

.debug-bar button,
.debug-bar select {
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  background: #f8fafc;
  color: #111827;
  font: inherit;
  font-weight: 800;
  box-shadow: inset 0 -2px 0 rgba(15, 23, 42, 0.18);
}

.debug-bar button {
  padding: 0 12px;
}

.debug-bar select {
  max-width: 140px;
  padding: 0 8px;
}

.debug-bar button:active {
  transform: translateY(1px);
  box-shadow: inset 0 2px 0 rgba(15, 23, 42, 0.18);
}

.debug-bar.is-minimized .debug-controls {
  display: none;
}

.debug-bar.is-minimized .debug-row {
  margin-bottom: 0;
}
