html, body {
  margin: 0;
  height: 100%;
  background: #0b0d12;
  overflow: hidden;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  user-select: none;
  touch-action: none;
}

#wrap {
  position: fixed;
  inset: 0;
}

canvas {
  width: 100vw;
  height: 100vh;
  display: block;
  background: #0b0d12;
}

.hud {
  position: fixed;
  top: 12px;
  left: 12px;
  right: 12px;
  pointer-events: none;
  color: rgba(255,255,255,0.92);
  text-shadow: 0 1px 2px rgba(0,0,0,0.55);
}

.topRow {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
}

.panel {
  background: rgba(14,18,28,0.65);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  padding: 10px 12px;
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.35);
}

.stats {
  display: grid;
  gap: 8px;
}

.statBlock {
  display: grid;
  gap: 4px;
}

.label {
  font-size: 11px;
  opacity: 0.85;
}

.bar {
  width: 160px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  overflow: hidden;
}

.fill {
  height: 100%;
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
}

.rightInfo {
  display: grid;
  gap: 6px;
  text-align: right;
}

.small {
  font-size: 11px;
  line-height: 1.3;
  opacity: 0.85;
  max-width: 240px;
}


.mobileControls {
  position: fixed;
  inset: 0;
  pointer-events: none;
  display: none;
}

.mobileControls.on {
  display: block;
}

.stick {
  position: fixed;
  left: 14px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  width: 96px;
  height: 96px;
  pointer-events: auto;
}

.stickBase {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
}

.stickKnob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.18);
}

@media (pointer: coarse) {
  .small {
    font-size: 11px;
  }
}

.overlay {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(5,7,10,0.7);
  color: white;
  text-align: center;
  padding: 24px;
}

.overlay.show {
  display: grid;
}

.card {
  max-width: 92vw;
  background: rgba(14,18,28,0.75);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  padding: 16px;
  backdrop-filter: blur(12px);
}

.card h1 {
  margin: 0 0 8px;
  font-size: 18px;
}

.card p {
  margin: 6px 0;
  font-size: 13px;
  opacity: 0.9;
}

.btnRow {
  margin-top: 12px;
  display: flex;
  justify-content: center;
}

button {
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.10);
  color: white;
  font-weight: 600;
}

@media (pointer: coarse) {
  .controlsHint { display: none !important; }
}

