body {
  margin: 0;
  background: #111;
  color: #ccc;
  font-family: monospace;
}

/* Canvas + menu overlay share the same box */
#stage {
  position: relative;
  width: min(96vw, 1200px);
  margin: 12px auto;
}

canvas {
  display: block;
  width: 100%;
  border: 1px solid #333;
  box-sizing: border-box;
}

#info {
  text-align: center;
  font-size: 13px;
  line-height: 1.6;
}

#err {
  text-align: center;
  color: #f66;
  white-space: pre-wrap;
}

/* ---------------- Menu ---------------- */
#menu {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 12, 24, 0.55);
}

#menu.hidden,
.panel.hidden {
  display: none;
}

.panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 28px 40px;
  background: rgba(10, 14, 26, 0.85);
  border: 1px solid #3a4a6a;
  border-radius: 10px;
  text-align: center;
  max-width: 90%;
}

.panel h1 {
  margin: 0;
  font-size: clamp(28px, 6vw, 56px);
  letter-spacing: 0.2em;
  color: #fff;
}

.panel h2 {
  margin: 0 0 4px;
  color: #fff;
}

.panel p {
  margin: 0;
  line-height: 1.6;
}

.subtitle {
  margin-bottom: 8px !important;
  color: #9ab;
}

.small {
  font-size: 12px;
  color: #889;
}

.panel a {
  color: #7cf;
}

.panel button {
  min-width: 200px;
  padding: 10px 20px;
  font: inherit;
  font-size: 16px;
  color: #fff;
  background: #24406e;
  border: 1px solid #4a6ea8;
  border-radius: 6px;
  cursor: pointer;
}

.panel button:hover {
  background: #2f5390;
}
