body {
  margin: 0;
  font-family: sans-serif;
  background: #1e272e;
  color: #fff;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

main {
  width: 100%;
  max-width: 420px;
  padding: 16px;
  text-align: center;
  box-sizing: border-box;
}

h1 {
  font-size: 1.6rem;
  margin: 8px 0;
}

.hud {
  display: flex;
  justify-content: space-around;
  margin-bottom: 8px;
  font-size: 1rem;
}

.scene {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}

.scene canvas {
  display: block;
  width: 100%;
  height: auto;
}

.msg {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

.msg p {
  margin: 6px;
}

#msg-title {
  font-size: 1.6rem;
  font-weight: bold;
}

#msg-sub {
  font-size: 1rem;
}

.help {
  font-size: 0.9rem;
  color: #ccc;
}

.pad {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
  touch-action: none;
}

.pad button,
.restart {
  font-size: 1.4rem;
  padding: 14px 0;
  border: none;
  border-radius: 10px;
  background: #ffca28;
  color: #222;
  font-weight: bold;
  cursor: pointer;
  touch-action: none;
  user-select: none;
}

.restart {
  margin-top: 12px;
  font-size: 1.1rem;
  padding: 12px 24px;
  background: #4fc3f7;
}

[hidden] {
  display: none !important;
}
