* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #0a0e18; }
canvas { display: block; cursor: default; }

.ui-btn {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10;
  font: 600 15px system-ui, sans-serif;
  letter-spacing: 0.5px;
  color: #dfeafc;
  padding: 10px 20px;
  border: 1px solid rgba(120,180,255,0.5);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background .12s, transform .06s;
}
.ui-btn.start { background: linear-gradient(180deg,#1f6f3f,#155a30); border-color: rgba(120,255,170,0.5); }
.ui-btn.back  { background: linear-gradient(180deg,#274067,#1b2c49); }
.ui-btn:hover { filter: brightness(1.15); }
.ui-btn:active { transform: translateY(1px); }

#speedCtl { position: fixed; top: 16px; left: 16px; z-index: 10; display: flex; gap: 6px; }
.spd-btn {
  font: 600 14px system-ui, sans-serif; color: #cfe0f5;
  background: rgba(20,32,54,0.85); border: 1px solid rgba(120,180,255,0.4);
  border-radius: 7px; padding: 8px 12px; cursor: pointer; user-select: none;
}
.spd-btn:hover { filter: brightness(1.2); }
.spd-btn.active { background: linear-gradient(180deg,#2a6cc0,#1c4c8c); border-color: rgba(150,200,255,0.85); }
.spd-btn:disabled { opacity: 0.4; cursor: default; filter: none; }

#buildCtl { position: fixed; top: 9px; left: 8px; z-index: 10; display: flex; gap: 6px; }
#buildCtl .spd-btn { padding: 6px 9px; font-size: 12px; }

#loadError {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: #5a1414; color: #ffdcdc;
  font: 600 14px/1.4 system-ui, sans-serif;
  padding: 12px 16px;
  border-bottom: 2px solid #ff5a5a;
}
